How can I get something like this to work in asp.net
<asp:Panel Visible="<%(SType==switch_type.Trunk).ToString()%>" runat="server">Tickle</asp:Panel>
Where switch_type is an enum of values and SType is a get/set in the codebehind.
I have this working, but I just feel it is ugly
<% if (SType == switch_type.Trunk)
{ %>
...
I know I can set the panel as visible/invisible in the codebehind, but there are going to be a lot of panels and it just seems easier to set the visibility in the aspx file.