title: ASP.Net MVC List of Checkboxes
body: <p>I am passing a model to a view, which containt a List of items. A DefaultCategories has an id (int), a description (string), and a selected boolean property.</p>
  
  <p>I need to list these items, with a checkbox, and check the ones where the selected property is true.</p>
  
  <p>So, I was trying this:</p>
  
  <pre><code>    &lt;h1&gt;
          Assigned Categories&lt;/h1&gt;
      &lt;table&gt;
          &lt;%foreach (var cat in Model.DefaultCategories)
  {%&gt;
          &lt;tr&gt;
              &lt;td&gt;
                  &lt;%=cat.Category %&gt;
              &lt;/td&gt;
              &lt;td&gt;
                  &lt;%=Html.CheckBoxFor(...) %&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
          &lt;%
  }%&gt;
      &lt;/table&gt;
  </code></pre>
  
  <p>I'm not sure how to handle the CheckBoxFor. I will also need to query these checkboxes when the Submit is clicked.... </p>