Sindhu Kavuri

Sindhu Kavuri

  • NA
  • 98
  • 12.3k

how to insert multiple checkbox data into database

Feb 24 2018 12:13 AM
i am having 3 checkboxes , say as SAD,HAPPY ,ANGRY. here the user selects and after clicking submit button i want their option to store in sql table..
 
THIS IS MY CODEBEHIND.
 
<h2>How Are You Feeling Today..?</h2>
<ul>
<li><asp:CheckBox ID="cb1" runat="server" />
<label for="cb1">
<img src="images/angry1.gif" /></label>
</li>
<li><asp:CheckBox ID="cb2" runat="server" />
<label for="cb2">
<img src="images/happy1.gif" /></label>
</li>
<li><asp:CheckBox ID="cb3" runat="server" />
<label for="cb3">
<img src="images/sad1.gif" /></label>
</li>
</ul>
<asp:Button ID="Button1" runat="server" Text="Submit" CssClass="btn" Font-Bold="True" Height="45px" Width="145px" />
 
i am a beginner to asp and sql .i hope someone can show me the right direction.
 
thank you in advance.

Answers (5)