title: MVC Model not posting
body: <p>When I click the login button I never get my model posted to the server. However if I accept a FormCollection I will see the values. How can I make this automatically bind to my model instead of searching the Form Collection?</p>
  
  <p>From what I have read there are a few common problems for this:
  <br>1 - your view does not specify what model you are using (@model myApp.Models.name)
  <br>2 - Your model does not use properties
  <br>3 - Any of the required fields are missing</p>
  
  <p><strong>Controller</strong></p>
  
  <pre><code>[HttpGet]
  public ActionResult Password()
  {
      return View(new AuthViewModel());
  }
  
  [HttpPost]
  public ActionResult Password(AuthViewModel password)
  {
      if (password == null || string.IsNullOrEmpty(password.Password))
      {
          ViewBag.Error = Constants.ErrorMessages.UserPassword_PassBlank;
          return View(new AuthViewModel());
      }
  
      //success
      return Redirect("/");
  }
  </code></pre>
  
  <p><strong>Model</strong></p>
  
  <pre><code>public class AuthViewModel
  {
      public string Password { get; set; }
  }
  </code></pre>
  
  <p><strong>View</strong></p>
  
  <pre><code>@model MvcApplication1.Models.AuthViewModel
  @{
      ViewBag.Title = "Password";
  }
  
  &lt;h2&gt;Password&lt;/h2&gt;
  @using (Html.BeginForm())
  {
      &lt;div&gt;@Html.TextBoxFor(m =&gt; m.Password,new{placeholder="Password",type="password",autofocus=""})&lt;/div&gt;
      &lt;div&gt;&lt;button id="btnLogin" type="submit"&gt;Login&lt;/button&gt;&lt;/div&gt;
      &lt;div class="error"&gt;@ViewBag.Error&lt;/div&gt;
  }
  </code></pre>