Click here to Skip to main content
15,881,172 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,

I need a sample code for multiple checkbox selection in c#.

I have an asp.net web form with multiple checkbox control and a button.
In multiple checkbox I have 4 items like admin,Users,Employees,students.
If I select one or two like check-boxes and if I click submit button,I want to save the selected values to be stored in Database.

Can anyone help me with a sample code.

Thank you,
Posted

1 solution

Have a look at this article that pulls in the selected values and displays it: http://www.codeproject.com/Articles/29663/Multiselect-Dropdown-for-Web-Applications[^]

You would need ADO.NET to save the data into database. Look here: Simple ADO.NET Database Read, Insert, Update and Delete using C#.[^]
 
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