title: Input type checkbox with MVC razor
body: <p>Why is the value of my checkbox not passed to my ViewModel?  </p>
  
  <p>My View (I omitted input tags not relevant for this post):</p>
  
  <pre><code>@model Pro.WebUI.ViewModels.UserViewModel
  
  @using (Html.BeginForm("ManageUsers", "Administration", FormMethod.Post, 
  new { id = "request-form", @class = "form-horizontal" }))
  {
   &lt;div class="form-group"&gt;
    &lt;label for="inputAuthorize" class="col-lg-2 control-label"&gt;Authorize&lt;/label&gt;
     &lt;div class="col-lg-8"&gt;
       &lt;input type="checkbox" id="Authorized" name="Authorized" value="@Model.Authorized" /&gt;
     &lt;/div&gt;
   &lt;/div&gt;
   &lt;div class="form-group"&gt;
    &lt;div class="col-lg-10 col-lg-offset-2"&gt;
     &lt;br /&gt;&lt;br /&gt;
     &lt;button type="submit" class="btn btn-primary"&gt;Submit Request&lt;/button&gt;
     &lt;/div&gt;
   &lt;/div&gt;
   }
  </code></pre>
  
  <p>My ViewModel:</p>
  
  <pre><code>public class UserViewModel
  {
      [Key]
      public string UserID { get; private set; }
  
      public string UserName { get; set; }
      public string FirstName { get; set; }
      public string LastName { get; set; }
      public bool Authorized { get; set; }
      public string Email { get; set; }
      public string Phone { get; set; }
      public string Notes { get; set; }
  }
  </code></pre>
  
  <p>My Controller:</p>
  
  <pre><code> [HttpPost]
      public ActionResult ManageUsers(UserViewModel model)
      {
          if (ModelState.IsValid)
          {
              ProcurementUser obj = new ProcurementUser();
              obj.UserName = model.Email;
              obj.FirstName = model.FirstName;
              obj.LastName = model.LastName;
              obj.Email = model.Email;
              obj.Phone = model.Phone;
              obj.Authorized = model.Authorized;
              UserRepository.SaveUser(obj);
              //success message
          }
          return View(model);
      }
  </code></pre>
  
  <p>I did not include all input tags but when I step through the code without the checkbox, all values are passed.  I looked at other checkbox questions on SOF but they mostly use the @Html.Checkbox or @Html.CheckboxFor.  I would like to just use input type="checkbox" </p>