title: How to get values of selected items in CheckBoxList with foreach in ASP.NET C#?
body: <p>I have a CheckBoxList like this:</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;asp:CheckBoxList ID="CBLGold" runat="server" CssClass="cbl"&gt;
      &lt;asp:ListItem Value="TGJU"&gt; TG &lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="GOLDOZ"&gt; Gold &lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="SILVEROZ"&gt; Silver &lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="NERKH"&gt; NE &lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="TALA"&gt; Tala &lt;/asp:ListItem&gt;
      &lt;asp:ListItem Value="YARAN"&gt; Sekeh &lt;/asp:ListItem&gt;
  &lt;/asp:CheckBoxList&gt;
  </code></pre>
  
  <p>Now I want to get the value of the selected items from this CheckBoxList using foreach, and put the values into a list.</p>