Inside the Itemtemplate of a ListView control I have this:
<td>
<asp:CheckBox ID="chkActive" runat="server" Checked='<%# Eval("ACTIVE") %>' />
</td>
But the ACTIVE field data type is string, because my database does not have a native boolean data type. So the ACTIVE fields contain either a "T" or a "F" to indicate the status.
How can I bind this field to the checkbox so it displays checked or unchecked accordingly?
I thought something like this but I'm sure it is incorrect:
<asp:CheckBox ID="chkActive" runat="server" Checked='<%# Eval("ACTIVE") ? true : false %>' />
First time I work with Eval() function. Thanks for any help. ...
Go to the complete details ...