I have a asp page that is using Site.Master.
I put a link in Site.Master, and master included default.aspx. How can I access link attribute in asp file?
in Site.Master :
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/Register.aspx"
Target="_blank">Register</asp:HyperLink>
The only way to do this is to do something along the lines of:
But note thet
FindControlis not recursive, so you’ll need to first find the control that holds the hyperlink you are looking for and then do anotherFindControlon this container using the id of the hyperlink you need.