title: .NET Core MVC form passing model with null properties
body: <p>I have a form that is suppose to pass my <code>Encounter</code> model to my <code>CharacterController</code>'s <code>CreateCharacter</code> action method. </p>
  
  <p>Here is the form:</p>
  
  <pre><code>&lt;form asp-action="CreateCharacter" asp-controller="Character" data-ajax="true" data-ajax-mode="replace" data-ajax-update="#character-container"&gt;
      &lt;button class="btn btn-default" type="submit"&gt;Create Chracter&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>Here's the controller method:</p>
  
  <pre><code>public ActionResult CreateCharacter(Encounter encounter)
  {
      Character character = new Character { Encounter = encounter };
      return PartialView("Add", character);
  }
  </code></pre>
  
  <p>All the properties of <code>encounter</code> are null when they shouldn't be. To clarify, <code>Encounter</code> is the model for the view that the form is in. Within this view, I use the <code>Name</code> property of <code>Encounter</code> and it works fine. When I pass the model to my controller, however, the <code>Name</code> property is now null.</p>
  
  <p>I'm confused why this is happening because I have a very similar form elsewhere that passes a model fine.</p>