I have a public property defined in code behind of a user control. I want to toggle visibility of controls in the markup based on the property’s value. However, using the
following syntax:
<td style="display:<%#(Container.PageControlMode == PageControlMode. PageMode.Wizard) ? "none" : "inline" %;">
I have the following property in my code behind:
public PageMode PageControlMode { get; set; }
Does not work and generate errors. What is a good way around it?
You have a malformed closing
%>tag. Place the semicolon before the percent symbol.