Hi, thought it time i stopped lurking :) Im currently building a project in .net and im having issues with check boxes. On one form i have a few text boxes for username, password, initials. Then check boxes to tick (these will be to allow/deny access to various forms later) this info is then saved to SQL database using a query. The check box values saving as 1 or 0, it being ticked or not.
Now on another form for existing users, i have identical check boxes, these ones however have to be bound, so i have a databind for "checkstate" set in the properties for each one. This works fine when i test the form - if they where ticked when creating the user they show as ticked, or not, on the edit form...
However, if i then hit the "save" button on this form, i get an error. The update tries to save the checkbox values as "true" or "false" and not 0 or 1. I cant for the life in me see how to set the checked value = 1, unchecked value = 0 properties. You can do that on check boxes in a gridview, but i cant see how on regular check boxes.
its infuriating, i cant see why one set of checkboxes saves the state as 1/0 and the other as true/false. They are actualy a copy and paste of each other, just that they write to the DB differently, and one set is bound.