Hi Everyone,
I was following this Demo and run into a problem. In the Web User Control(ascx) page, I need to Evaluate the CheckBox when editing a record. When I click on Edit, it work great but when I click on "Add new record", I'm getting this error:
Error: Sys.WebForms.PageRequestManagerServerErrorException: Specified cast is not valid.
This is coming from the Checked function. Below is my coding.
Can someone help me so ignore the Checked function when I try to insert a record or modify the above Checked code?
I was following this Demo and run into a problem. In the Web User Control(ascx) page, I need to Evaluate the CheckBox when editing a record. When I click on Edit, it work great but when I click on "Add new record", I'm getting this error:
Error: Sys.WebForms.PageRequestManagerServerErrorException: Specified cast is not valid.
This is coming from the Checked function. Below is my coding.
<
asp:CheckBox
ID
=
"chkbxReadOnly"
runat
=
"server"
Checked='<%# DataBinder.Eval(Container, "DataItem.ReadOnly") %>'
AutoPostBack="True" />
Can someone help me so ignore the Checked function when I try to insert a record or modify the above Checked code?