如何使用服务器端代码替换列表项中的控件。我需要更换这个
<li>
<asp:LinkButton ID="btnUpload" runat="server" OnPreRender="btn_PreRender" CommandName="Uploader"
TabIndex="2">Upload</asp:LinkButton>
or <a target="_blank" href="../PersonalInfo/MailingAddress.htm">Mail</a> the form.
</li>
与
<li>
<asp:LinkButton ID="hplnkViewDocument" runat="server" Text="View Document" SkinID="lnkBtnBlue"></asp:LinkButton>
</li>
最佳答案
我将在li
中同时拥有两个控件,然后使用Visible
属性仅显示/隐藏所需的控件。