Click here to Skip to main content
15,918,178 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Friends , I Am Creating Webform ,Where No.of CheckBox are Present ,Please Tell me How I Save Multiple Checkbox In Database
<input type="checkbox" name="Toggle" value="1"> C# <br/>
<input type="checkbox" name="Toggle" value="2"> Asp.NET<br/>
<input type="checkbox" name="Toggle" value="3"> VB.NET<br/>
<input type="checkbox" name="Toggle" value="4"> SQL SERVER<br/>
<input type="checkbox" name="Toggle" value="5"> JavaScript<br/>
<input type="checkbox" name="Toggle" value="6"> Jquary<br/>
                       <br />
         <br />
         <asp:Button ID="Button1" runat="server" Text="Submit" ForeColor="#3399FF" Width="20%" Height="15%" BorderColor="#660033"/>
Posted
Updated 22-Dec-15 16:57pm
v2
Comments
[no name] 22-Dec-15 7:49am    
Think about "binary coding" your checkbox values: 1, 2, 4, 8, ....
With MSSQL bigint you can handle 64 checkboxes. If this is not enough I personally would go than for string. Not efficient, but straight Forward.

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