title: asp-for inputs not binding to ViewModel
body: <p>I have a simple form that uses the <code>asp-for</code> attribute. </p>
  
  <pre><code>@using System.Threading.Tasks
  @using MyApp.Controllers
  @using MyApp.Models.Login
  @model MyApp.Models.Login.LoginModel
  
  &lt;form asp-controller="Login" asp-action="Login" asp-route-returnUrl="@ViewBag.ReturnUrl" method="post" class="form-horizontal" role="form"&gt;
    &lt;div class="form-group"&gt;
      &lt;label class="col-md-2 control-label"&gt;UserName&lt;/label&gt;
      &lt;div class="col-md-6"&gt;
        &lt;input asp-for="Username" class="form-control"/&gt;
        &lt;span asp-validation-for="Username" class="text-danger"&gt;&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
      &lt;label class="col-md-2 control-label"&gt;Password&lt;/label&gt;
      &lt;div class="col-md-6"&gt;
        &lt;input asp-for="Password" type="password" class="form-control"/&gt;
        &lt;span asp-validation-for="Password" class="text-danger"&gt;&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
    &lt;div class="form-group"&gt;
      &lt;div class="col-md-offset-2 col-md-1"&gt;
        &lt;button type="submit" class="btn btn-primary"&gt;Log in&lt;/button&gt;
      &lt;/div&gt;
      &lt;div class="col-md-offset-2 col-md-3"&gt;
        &lt;a href="/ForgotPassword" class="pull-right"&gt;Forgot password?&lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>My Controller has an action that accepts LoginModel, but the Properties are null when I click submit.</p>
  
  <pre><code>[AllowAnonymous]
  [HttpPost("/Login")]
  public async Task&lt;IActionResult&gt; Login(LoginModel lm, string returnUrl)
  {
      //lm.Username and lm.Password are null
      //...
  }
  </code></pre>
  
  <p>Here is LoginModel:</p>
  
  <pre><code>public class LoginModel
  {
      [Required(ErrorMessage = "Username is required", AllowEmptyStrings = false)]
      public string Username { get; set; }
  
      [Required(ErrorMessage = "Password is required", AllowEmptyStrings = false)]
      public string Password { get; set; }
  }
  </code></pre>
  
  <p>I'm using ASP.NET Core 1.0 RTM. Here is my project.json:</p>
  
  <pre><code>"buildOptions": {
      "emitEntryPoint": true,
      "preserveCompilationContext": true
  },
  "dependencies": {
  "EspritWeb.Services": "1.0.0-*",
  "Microsoft.AspNetCore.Authentication.Cookies": "1.0.0",
  "Microsoft.AspNetCore.Authorization": "1.0.0",
  "Microsoft.AspNetCore.Diagnostics": "1.0.0",
  "Microsoft.AspNetCore.Hosting": "1.0.0",
  "Microsoft.AspNetCore.Hosting.Abstractions": "1.0.0",
  "Microsoft.AspNetCore.Http.Extensions": "1.0.0",
  "Microsoft.AspNetCore.Localization": "1.0.0",
  "Microsoft.AspNetCore.Mvc": "1.0.0",
  "Microsoft.AspNetCore.Routing": "1.0.0",
  "Microsoft.AspNetCore.Server.IISIntegration": "1.0.0",
  "Microsoft.AspNetCore.Server.Kestrel": "1.0.0",
  "Microsoft.AspNetCore.Session": "1.0.0",
  "Microsoft.AspNetCore.StaticFiles": "1.0.0",
  "Microsoft.Extensions.Caching.SqlServer": "1.0.0",
  "Microsoft.Extensions.Logging.Console": "1.0.0",
  "Microsoft.Extensions.Logging.Debug": "1.0.0",
  "Microsoft.VisualStudio.Web.BrowserLink.Loader": "14.0.0"
  },
  
  "frameworks": {
      "netcoreapp1.0": {
           "dependencies": {
               "Microsoft.NETCore.App": {
               "type": "platform",
               "version": "1.0.0"
               }
          }
      }
  },
  
  "runtimes": {
      "win10-x64": {}
  }
  </code></pre>
  
  <p>Any ideas why I'm getting this behavior? Thanks!</p>