Click here to Skip to main content
15,887,979 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All
I have been using text boxes instead of check boxes for a data field that only saves a single character in the database because i'm not sure how to implement it

I am retrieving few data fields using a query in ado.net and binding them to the text fields.How do i use check boxes for few fields that only save a single character

so say if a value is returned for a feild then that particular check box is checked or it should not be checked

and in the same way my update query is just reading the text and updating the database.I would like to do it in a way such that if it is checked then it should insert the character otherwise it should not


is there any previous post where this has been explained for beginners



Thanks
Posted
Comments
Programm3r 4-Dec-12 0:58am    
Hi - why not write some sort of helper method that would translate the bit value (true / false) into something more meaningful. That way you could get data from the DB pass it on to the helper method, which translates it into a true or false and vice versa.

Also please have a look at the following thread: http://forums.asp.net/t/1278245.aspx/1

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900