title: ASP.NET MVC: Values sent by jQuery ajax is not being bound to the view model by the action
body: <p>I cannot explain why the parameters I'm sending to the controller is always null. Here's my AJAX call:</p>
  
  <pre><code>var contactViewModel = { "CustCompId": _custCompId, "SuppID": 0 };
  
  $.ajax({
           async: false,
           type: 'POST',
           data: JSON.stringify(contactViewModel),
           url: crudServiceBaseUrl + "GetContacts",
           success: function (result) {
                    contactData = result;
           }                           
    });
  </code></pre>
  
  <p>This is the action that the parameters are supposed to be posted to</p>
  
  <pre><code>public JsonResult GetContacts(SuppOrCustViewModel contactViewModel)
  {
     //CustCompId and SuppID are always null
  }
  </code></pre>
  
  <p>And this is how I defined the <strong>SuppOrCustViewModel</strong></p>
  
  <pre><code>public class SuppOrCustViewModel
  {
      public int? CustCompId { get; set; }
      public int? SuppID { get; set; }
  }
  </code></pre>
  
  <p>When I put a break point to GetContacts, both properties inside contactViewModel are null. Any reason for that? Looking at what the browser sent, this is what I see: <code>{"CustCompId":4,"SuppID":0}:</code></p>
  
  <p>Thank for helping.</p>