title: Get Checkbox value in MVC Controller parameter
body: <p>I have a checkbox in my view that I am posting back to the Controller as a parameter, but when the checkbox is checked the controller receives the value as a string "on", and when unchecked the value in the parameter is "off". Is there any way to have this value postback as an int or bool? When I try bool below it is always null because it doesn't match the data type.</p>
  
  <pre><code>&lt;label&gt;&lt;input type="checkbox" name="option"&gt;food&lt;/label&gt;
  
  
          public ActionResult Select(bool? option)
          {....
  </code></pre>