I came across some code like this:
public string IsAdmin()
{
string style = "";
if(EditUserName == "")
{
style = "visibility:hidden;display:none";
}
return style;
}
Then in the html, I see something like this:
<table style='<%= IsAdmin() %>'>
</table>
The above doesn't seem the best way to do this. Is there a more efficient and alternative way to set the style of html elements programmatically.