title: Check if at least one checkboxlist is selected
body: <p>I have checkboxlist and I would like to check if at least one checkbox is checked.  If none is checked then I want to show alert message that says please select at least one item.  I want to do this in code behind if possible.  I have started but don't know if it is right or wrong but not able to finish it. </p>
  
  <pre><code> public void alert()
      {
          foreach (ListItem listItem in cblCustomerList.Items)
          {
              if (!listItem.Selected)
              {
              }
          }
      }
  </code></pre>
  
  <p>here is the checkboxlist in aspx:</p>
  
  <pre><code> &lt;asp:CheckBoxList ID="cblCustomerList" runat="server" DataSourceID="SqlDataSource1" CssClass="CheckBoxList"
              DataTextField="GroupName" DataValueField="GroupName" 
                  onclick="readCheckBoxList()" &gt;               
              &lt;/asp:CheckBoxList&gt;
  </code></pre>
  
  <p>here is the button:</p>
  
  <pre><code> &lt;asp:Button ID="Button1" runat="server" CausesValidation="True" 
                              CommandName="Insert" Text="Insert" OnClientClick="return Validate_Checkbox()" /&gt;
  </code></pre>
  
  <p>Thanks for your help.</p>