title: How do I get the selected values of a checkbox list?
body: <p>If I have a CheckBoxList within a form, like this...</p>
  <pre><code>@using (Html.BeginForm(&quot;Save&quot;, &quot;Product&quot;, FormMethod.Post))
  {
      ...
  
      @Html.CheckBoxList(&quot;Categories&quot;, Model.AllCategories);
  
      ...
  }
  </code></pre>
  <p>... how can I get a list of selected values (checked values) in my controller action?</p>
  <p>For example, if the check box list has items with values of:</p>
  <blockquote>
  <p>Cat. 1</p>
  <p>Cat. 2</p>
  <p>Cat. 3</p>
  <p>Cat. 4</p>
  </blockquote>
  <p>...and <code>Cat. 2</code> and <code>Cat. 3</code> are selected, how can I get an array containing those values?</p>