I'm confused which one is better.
ASPX:
<asp:HyperLink ID="HyperLink1" runat="server">HyperLink</asp:HyperLink>
Code:
String url = "http://stackoverflow.com";
if(IsShow)
{
HyperLink1.Visible = true;
HyperLink1.NavigateUrl = url;
}
and the second option is:
<%if(IsShow){%>
<a href="<%=url%>">HyperLink</a>
<%}%>
This two ways to do exactly same.
Which one is better, and why?