Click here to Skip to main content
14,119,858 members
Rate this:
Please Sign up or sign in to vote.
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
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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web03 | 2.8.190518.1 | Last Updated 23 Aug 2013
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100