title: ASP.NET Core Razor ajax POST request data object is empty
body: <p>There is a simple ajax POST request that must <strong>stringify</strong> a simple class and pass it in the body of POST request, but the <strong>Person</strong> parameter on the server-side has empty(default) values</p>
  <pre><code>// javascript
  var person = { &quot;FirstName&quot;: &quot;Andrew&quot;, &quot;LastName&quot;: &quot;Lock&quot;, &quot;Age&quot;: &quot;31&quot; };
  $.ajax({
      type: &quot;POST&quot;,
      url: &quot;/UpdatePostBody?handler=Abc&quot;,
      contentType: &quot;application/json; charset=utf-8&quot;,
      dataType: &quot;json&quot;,
      data: JSON.stringify(person),
      headers: {
          RequestVerificationToken:
              $('input:hidden[name=&quot;__RequestVerificationToken&quot;]').val()
      },
  })
      .done(function (result) {
          console.log(result);
  });
  
  C# code
  public IActionResult OnPostAbc(Person person)
  {
      return new JsonResult(&quot;my result&quot;);
  }
  </code></pre>
  <p><a href="https://i.stack.imgur.com/2s3eQ.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2s3eQ.png" alt="enter image description here" /></a></p>
  <p>On the server-side, there is a simple ASP.NET Core Razor page with a method that gets hit and returns the result but the <strong>person</strong> param members have no values.</p>