I'm getting a "Specified cast is not valid" error related to a checkbox on my Advanced Edit form in Scheduler.
The database field is a bit type.
Here is the code...
ASPX:
<table cellpadding="0" cellspacing="0" border="0"> |
<tr> |
<td><b>Title</b></td> |
<td> </td> |
</tr> |
<tr> |
<td><asp:TextBox runat="server" ID="EventTitleTemp" Text='<%# Eval("EventTitle") %>' Width="240px"></asp:TextBox></td> |
<td><div style="margin-bottom:3px;"><asp:CheckBox runat="server" ID="EventActiveTemp" Checked='<%# Convert.ToBoolean(Eval("EventActive")) %>' style="padding: 0em; margin: 0em; vertical-align: middle;"></asp:CheckBox> Active</div></td> |
</tr> |
</table> |
Code Behind:
[Bindable(BindableSupport.Yes, BindingDirection.TwoWay)] |
public bool EventActive |
{ |
get |
{ |
return EventActiveTemp.Checked; |
} |
|
set |
{ |
EventActiveTemp.Checked = value; |
} |
} |
Am I missing something? Doing this totally wrong? Any help would be appreciated.