title: How to find selected items in checkbox list binded from database
body: <p>I am facing problem in finding the checked items in checkbox list. Actually the list items for the checkbox list are loaded from database. But by using the code below i am not able to find the checked item in the list and the items are always returning false. Below is my code Can someone please help me with this?</p>
  
  <pre><code> protected void GetCheckboxlist_Click(object sender, EventArgs e)
          {
              string s = string.Empty;
              for (int i = 0; i &lt; CheckBoxList1.Items.Count; i++)
              {
  
              if (CheckBoxList1.Items[i].Selected)
              {
  
                  // List the selected items
                  s = s + CheckBoxList1.Items[i].Text + ",";
  
              }
  
          }
      }
  </code></pre>