You can always bind the
Visible
property to a method on your .cs file.
But you can also use inline code like this:
<%
if (IsVisible())
{%>
<asp:LinkButton ID="mylink" Text="Your link text"runat="server"> </asp:LinkButton>
<% }%>
You can condition the rendering of any asp.net or html code based on the logic on that IsVisible function. That could be implemented like this:
protected bool IsVisible()
{
return Roles.IsUserInRole("admin");
}
You replace the function with the final code, in this case because is a simple return line, but well, that will depend on your back-end code.
Hope it helps.