Reputation: 558
Here is the control i want to be created only if the condition is true. How do I do that using say the "Visible" attribute or something easy like that?
<p><%# (GetAnswer(Eval("AnsQID"))) != 1 ? (Eval("AText")) : ""%></p>
Upvotes: 0
Views: 74
Reputation: 3360
<asp:Label ID="lblAnswer" Text='<%# GetAnswer(Eval("AnsQID")) != 1 ? (Eval("AText")) : "" %>' Visible='<%# YourMethodHere() %>' />
Upvotes: 2