string selectedItems = string.Empty; foreach (ListItem item in this.CheckBox1.Items) { if (item.Selected) selectedItems += item + ","; } SqlCommand cmd = new SqlCommand("Insert into Candidates(Candidate_Pref_Job_Cat) values('" + selectedItems + "')", cn); cn.Open(); // I am assuming that you have written down the connection string. int iCount = cmd.ExecuteNonQuery(); cn.Close();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)