Disable a HyperLink from code behind
19,180
in your aspx, add runat="server" attribute to the tag:
<a id="myHyperLink" runat="server">...</a>
in Page_load method:
if( condition )
myHyperLink.Enabled = false;
Author by
ANP
Updated on June 13, 2022Comments
-
ANP almost 2 years
In my project I need to disable a hyperlink based on some condition. So how can I do this from code behind using C#?