Write a method in your code behind, put the
if
in there, and call your method from the markup.
public void ControlEval(string evalThis)
{
if (pnlFeaturesText.Visible)
{
Eval(evalThis);
}
}
and then you can do this:
<asp:Label runat="server" Text='<%# ControlEval("Feature1"); %>' Style="font-weight: 700;" Font-Names="Verdana" /><br />
<asp:Label runat="server" Text='<%# ControlEval("Benefit"); %>' Font-Names="Verdana" /></li></ul>