In
this example "Include Time" is a SP yes/no field where we're checking for a
value of "yes":
<%# Eval("Include Time").ToString() == "True" ? " ("
+ Eval("Start Time","{0:hh:mm tt}") + ")" : "" %>
In
this example "Active" is a SP yes/no field where it's casted to a boolean value
and then used to control visibility of an asp:Label control:
Visible='<%#
bool.Parse(Eval("Active"). ToString()) %>'
Another example of setting the Visible property. If the value of Descrition is null, hide the control:
Visible='<%# bool.Parse(Eval("Description") == null ? "False" : "True") %>'
Another example of setting the Visible property. If the value of Descrition is null, hide the control:
Visible='<%# bool.Parse(Eval("Description") == null ? "False" : "True") %>'
No comments:
Post a Comment