Hi all
I'm creating a multiple view form using FormViews within a Wizard control. I've been working my way through various problems and I'm getting close but get the following error when I try to Update.
System.InvalidCastException was unhandled by user code
Message="Conversion from type 'DBNull' to type 'Boolean' is not valid."
Source="Microsoft.VisualBasic"
StackTrace:
at Microsoft.VisualBasic.CompilerServices.Conversions.ToBoolean(Object Value)
at ASP.Referral_aspx.__DataBinding__control287(Object sender, EventArgs e) in C:\Inetpub\wwwroot\WebSite1\ContentPages\Referral.aspx:line 1197
at System.Web.UI.Control.OnDataBinding(EventArgs e)
at System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding)
at System.Web.UI.Control.DataBind()
at System.Web.UI.Control.DataBindChildren()
Line 1197 <asp:CheckBox ID="ToDeptALabel" runat="server" Checked='<%# Bind("ToDeptA") %>' Enabled="False" />
The database (SQL2K) field is a bit (Nulls allowed) default 0.
I presume that the checkbox is being interpreted as a NULL value as opposed to a Boolean 0, but I don't know how to change it?
Any pointers would, as always, be greatly appreciated.
a~l~e~x