title: Getting Checkbox Value in ASP.NET MVC 4
body: <p>I'm working on an ASP.NET MVC 4 app. This app has a basic form. The model for my form looks like the following:</p>
  
  <pre><code>public class MyModel
  {
      public string Name { get; set; }
      public bool Remember { get; set; }
  }
  </code></pre>
  
  <p>In my form, I have the following HTML.</p>
  
  <pre><code>&lt;input id="Name" name="Name" type="text" value="@Model.Name" /&gt;
  &lt;input id="Remember" name="Remember" type="checkbox" value="@Model.Remember" /&gt;
  &lt;label for="Remember"&gt;&amp;nbsp;Remember Me?&lt;/label&gt;
  </code></pre>
  
  <p>When I post the form, the Remember value in the model is always false. However, the Name property in the model has a value. I've tested this by setting a breakpoint in the following:</p>
  
  <pre><code>[HttpPost]
  public ActionResult MyAction(MyModel model)
  {
    Console.WriteLine(model.Remember.ToString());
  }
  </code></pre>
  
  <p>I can't figure it out. Why isn't the Checkbox value getting set? </p>