Click here to Skip to main content
15,886,807 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I have a page with 2 sections.

Employee and Operation with different check boxes for each section, each having a "Select All" for selelcting all check boxes and a common check box to select all the items from both sections.

I need to store the names of all selected check boxes in the database. How can I do it wth checklist control or which is the best control to implement this?

please help me.
Thank you.
Posted
Updated 15-Jan-11 2:05am
v2
Comments
Dalek Dave 15-Jan-11 8:05am    
Edited for Grammar, Syntax and Readability.

1 solution

You can use Checkboxlist of asp.net for this purpose. At the time of saving it into DataBase, you need to iterate through both the checkboxlist and check, what all items are checked and accordingly save it into database.
Are you facing any other issue, let me know
 
Share this answer
 
Comments
abdu_karami 15-Jan-11 7:12am    
in checklist box, how can i print all the items which gets data from datatable so that each check box shold hav unique name or value? how to make looop for reading and printing into checkbox ?
Dalek Dave 15-Jan-11 8:06am    
Sage Advice!
Brij 15-Jan-11 9:40am    
I didn't get you.If you want to generate the items dynamically, based on database then You can bind your checkboxlist to a datatable and assign the properties DataTextField, DataValueField with the specific column names of datatable. So now your each checkbox will be having name and value according to the data in datatable.
else you can add the checkbox item in the checkboxlist at design time only.

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