title: asp.net MVC checkbox headache!
body: <p>I have seen lots of questions relating to this topic.</p>
  
  <p>I am using asp.net MVC 1.0</p>
  
  <p>Problem area</p>
  
  <p>If I use</p>
  
  <pre><code>&lt;%= Html.CheckBox("Status", true) %&gt;
  </code></pre>
  
  <p>Then why It renders like</p>
  
  <pre><code>&lt;input checked="checked" id="Status" name="Status" type="checkbox" value="true" /&gt;&lt;input name="Status" type="hidden" value="false" /&gt;
  </code></pre>
  
  <p>I put this in foreach loop and I have 5 rows.</p>
  
  <p>when I submit form with <strong>true,true,true,false,false</strong>
  then I get <code>true,false,true,false,true,false,false,false</code></p>
  
  <p>i.e. for false =>  false.</p>
  
  <p>for true => true,false</p>
  
  <p>If I use</p>
  
  <pre><code>&lt;input type="checkbox" value="true" name="Status" checked="checked" /&gt;
  </code></pre>
  
  <p>Then I don't get unchecked one's.</p>
  
  <p>so how do I overcome form this problem?</p>
  
  <p>Please don't post answer with using loop in formcollection object and checking each key!</p>