title: MVC html.checkbox posting two values to controller
body: <p>I am using <code>html.checkbox</code> in my mvc appplication , it will generate the html like</p>
  
  <pre><code>&lt;input checked="checked" id="cb17" name="reports" type="checkbox" value="sdf" /&gt;
  &lt;input name="reports" type="hidden" value="false" /&gt; 
  
      &lt;input checked="checked" id="cb18" name="reports" type="checkbox" value="ty" /&gt;
  &lt;input name="reports" type="hidden" value="false" /&gt;
  </code></pre>
  
  <p>when the form gets posted  it is sending all the values of html.checkbox to mvc action through model binding concept.</p>
  
  <pre><code>reports[0]-"sdf"
  reports[1]-"false"
  reports[2]="ty"
  reports[3]="false" 
  </code></pre>
  
  <p><strong>model:</strong></p>
  
  <pre><code> public IEnumerable&lt;string&gt; reports{ get; set; }
  </code></pre>
  
  <p>i knew <strong>html.checkbox will create the hidden fields internally</strong>, but when i posting the form it need to send either one value of checkbox. why it is sending hidden fields too. how to avoid this.</p>
  
  <p>referred the below link</p>
  
  <p><a href="https://stackoverflow.com/questions/2697299/asp-net-mvc-why-is-html-checkbox-generating-an-additional-hidden-input">asp.net mvc: why is Html.CheckBox generating an additional hidden input</a></p>
  
  <p>but not able to get the proper understanding.</p>