Below is my form want to submit the form and checklist box data to SQL server.
Below is my Data Base structure
Below is my code
protected void Button1_Click(object sender, EventArgs e)
{
string interests = string.Empty;
foreach (ListItem item in this.CheckBoxList1.Items)
{
if (item.Selected)
{
interests += item + ",";
}
}
try
{
SqlCommand cmd = new SqlCommand();
cmd.CommandText = "solarinsert";
cmd.CommandType = CommandType.StoredProcedure;
cmd.Connection = con;
cmd.Parameters.AddWithValue("@name", TextBox1.Text);
cmd.Parameters.AddWithValue("@contactno& ...
Go to the complete details ...