I have been working in a .NET Framework 4 project using server tags like <%=whatever %> to set the visibility of runat=\"server\" controls, like the following:
Another approach is ti give an ID to the control and set the visible in code.
protected void Page_Load(object sender, EventArgs e){ MyId.Visible = MyVisiblePropertyOnCodeBehind; } Content