c# - Accessing <li> tag, ASP.Net -
i'm trying access <li>
tag in first master page file. tried findcontrol(..) allways returns null.
structure:
- first master page (which contains
<li id="element" runat="server"
> - second master page
- default.aspx (need access here)
what need access li element?
you access server-side control so:
page.master.findcontrol("controlid");
however, if tag not set runat="server"
, you'll have find way, such getting resulting response.content , changing @ point.
edit: since you're using nested master pages, may need go further in control hierarchy if want reach "root" master , find control in it.
maybe: control li = page.master.master.findcontrol("controlid")
Comments
Post a Comment