title: ASP.NET Core jQuery .ajax post always null?
body: <p>ASP.NET Core 3.1
  jQuery 3.3.1</p>
  
  <p>I've cut down my code to the bare bones, My client side JavaScript looks like this:</p>
  
  <pre><code>    $.ajax({
          url: "/xxx/Edit",
          type: "POST",
          contentType: "application/json",
          data: JSON.stringify("Hello"),
          success: function (result) {
  
              //
          },
          error: function (jqXHR) {
  
              //
          }
  </code></pre>
  
  <p>My server-side Controller Action code is:</p>
  
  <pre><code>// xxx controller
  public async Task&lt;JsonResult&gt; Edit(string data)
  {
      ...
      await ...
  }
  </code></pre>
  
  <p>The value of data is always <strong>null</strong>.  It should be "Hello".  </p>
  
  <p>In the real code the data is not simply a string, it is a complex type, but I have found that even with a simple string (as with a complex type) the action parameter is null???</p>
  
  <p>Anyone have any ideas why the controller action does not receive "Hello" in its parameter?</p>