Originally I had a TemplateField with a CheckBox in it but I couldn't set the checkbox Value using
Checked='<%# (bool)Bind("FieldName") %>
or
Checked='<%# (bool)Eval("FieldName") %>
It kept throwing an invalid cast exception. The field in the database is a bit field set to 1 or 0.
I tried switching to a checkbox field but because my update code is in the codebehind instead of using the updatecommand parameters in a datasource I can't seem to retrieve the value from the CheckBoxField to pass to my business logic.
Can any one point me on how to retrieve the value from the CheckBoxfield in a detailsview?