title: How to get checkbox value from FormCollection?
body: <p>I have a checkbox and button:</p>
  
  <pre><code>@using(Html.BeginForm())
  {
      &lt;div id="search-block"&gt;
          &lt;input type="checkbox" name="showAll" id="showAll"&gt;Include completed
          &lt;input type="submit" value="Apply"/&gt;
      &lt;/div&gt;
  }
  </code></pre>
  
  <p>and second thing in controller:</p>
  
  <pre><code>[HttpPost]
  public ActionResult Index(FormCollection collection)
  {
      var showAll = collection["showAll"];
      TempData["showAll"] = showAll;
  
      ... 
      something
      ...
  }
  </code></pre>
  
  <p>It's actually working, BUT:</p>
  
  <p>If checkboxes are not checked, I am receiving null (doesn't bother me much).</p>
  
  <p>If checkboxes are checked, I am receiving "on" from <code>FormCollection</code>, and this is not what I need. I want to receive true or false.</p>
  
  <p>How can I do this?</p>