Click here to Skip to main content
15,881,852 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi all, i have never used a checkbox list before hence i dont know how to work with it. Now am in a situation whereby i need to include it in my application. I have a table in sql server 2008 express. The table gets values from web form controls namely radiobuttonlists and textboxes. Now the users want me to add a checkboxlist because they want to select more options.

The question is how many columns do i need to add to the table that will associate with the checkboxlist, and how will i retrieve the data back to checkboxlist to what was selected.

I have searched but no concrete example or explanation is given
Posted
Comments
CodeBlack 23-Aug-13 0:10am    
so as per your question your page will be having multiple textbox with multiple checkboxes like


TextBox1 - cbox11 cbox12 cbox13

TextBox2 - cbox21 cbox22 cbox23

TextBox3 - cbox31 cbox32 cbox33

is it right ?

1 solution

Create a table for this to store the selected check box values and user's unique id.
Insert user's unique id and the values to the DB (insert values into DB through the loop in BL or send the comma separated values to the SP and make it work).

For retrieving data back to the check box.
fetch the selected check box value and checked it based on the value

I think it may help you
 
Share this answer
 

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