Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

replace controls in <li>

Tags:

c#

asp.net

How do i replace the controls in a list item using server side code. I need to replace this

    <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>

with

    <li>
       <asp:LinkButton ID="hplnkViewDocument" runat="server" Text="View Document" SkinID="lnkBtnBlue"></asp:LinkButton>
    </li>
like image 847
Ronald McDonald Avatar asked Mar 25 '26 10:03

Ronald McDonald


1 Answers

I would have both controls in the li, then only show/hide the one you want, using the Visible property.

like image 183
Matt Grande Avatar answered Mar 27 '26 23:03

Matt Grande



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!