title: insert checkboxlist value in database using (c#)ado.net
body: <p>i want to know how can i insert checkboxlist value in sql server database actually i know in asp.net how to insert checkboxlist value in database but im not getting in c#.net </p>
  
  <pre><code>foreach (ListBox lb in checkedListBox1.Items)
  {
      if (lb.SelectedItem)
      {
          str += lb.ValueMember + ",";
      }
  }
  </code></pre>
  
  <p>i just try above code but it give me error instead listitem im use listbox </p>