title: MVC Binding to checkbox
body: <p>I have found so many questions about this, but none of them go over or seem to go over my scenario. I have a model:</p>
  
  <pre><code>public class CheckBoxModel
  {
              public int Id{ get; set; }
      public bool IsSelected { get; set;  }
  }
  </code></pre>
  
  <p>In then try and bind my IsSelected bool to a checkbox like this:</p>
  
  <pre><code>&lt;%= Html.CheckBox("IsSelectedCheck",Model.IsSelected)%&gt;
  </code></pre>
  
  <p>I have lots of items on a page, they all  have a checkbox next to them, all i am trying to do is pass back to the controller all the id's of the items and which ones have been selected. </p>
  
  <p>At the moment, the value of IsSelected is always false. Should Html.CheckBox set the value of Model.IsSelected each time the user toggles the checkbox. </p>
  
  <p>Thanks</p>