I need to snap my flag somewhere, even if it is invalid, so I won’t get an error about invalid casting.
DataTable dt = new DataTable();
dt.Columns.Add("Name");
dt.Columns.Add("DeleteFlag", typeof(bool));
In ASP:
<asp:CheckBox ID="MyCheckBox" runat="server" Checked='<%# Bind("DeleteFlag") %>'
Enabled="False"/>
(If I delete this code, it works, but the checkbox does not appear.) Perhaps create an instance with the value already set (true, false)
Can anyone help? If necessary, reply in the comments.
source
share