title: jquery ajax post data always Null at controller side
body: <p>I have been trying to make Ajax post but data always getting Null at Controller side. Pls Help:-</p>
  
  <pre><code>**Model:-**
  public class UpdateProxyTracker
      {    
          public string Test_Reference_Id { get; set; }
          public string Owner { get; set; }
          public string Remarks { get; set; }        
          public string Status { get; set; }        
      }
  
  **View:** 
  @using (Html.BeginForm("UpdateTracker", "Home", FormMethod.Post, new { id = "optionForm" }))
  { 
  &lt;div&gt;
          &lt;fieldset style="background-color: #FFFFFF"&gt;
              &lt;legend&gt;Update Details&lt;/legend&gt;
              &lt;table&gt;
                  &lt;tr&gt;
                      &lt;td&gt;Test Ref Id&lt;/td&gt;
                      &lt;td&gt;
                          &lt;input id="testrefId" readonly="readonly" type="text" value=@Model.Test_Reference_Id&gt;
                      &lt;/td&gt;
                  &lt;/tr&gt;
  ......
  ...
  }
  
  **JQuery:**
  $(document).ready(function () {
      $("#SaveT").click(function () {
  
          var status = $("#statusddl").val();
          var owner = $("#owner").val();
          var remark = $("#remark").val();
          var test_Reference_Id = $("#testrefId").val();
  
          var data =
          {
              'Test_Reference_Id': test_Reference_Id,
              'Owner': owner,
              'Remarks': remark,
              'Status': status
          };
  
          $.ajax({
              url: '@Url.Action("UpdateTracker", "Home")',            
              type: "POST",
              contentType: 'application/json',
              dataType: 'json',
              data: data,            
              success: function (msg) {                           
              },
              error: function (XMLHttpRequest, textStatus, errorThrown) {
                  alert(errorThrown);                
              }
          });
  
      });
  });
  
  
  **Controller:**
  public ActionResult UpdateTracker(UpdateProxyTracker data)
          {
                  SepHomeService svc = new SepHomeService();
                  bool isValid = svc.UpdateData(data);
                  var result = svc.GetData();
                  return View("Dataview", result);
          }
  </code></pre>
  
  <p><strong>Routs:</strong>
       routes.MapRoute(
                  name: "Default",
                  url: "{controller}/{action}/{id}",
                  defaults: new { controller = "Home", action = "Index", id = UrlParameter.Optional }
              );</p>
  
  <p><strong>Question</strong>
  Here data is always Null.
  I Tried passing Data as JSON.stringify(data) but did not helped
  Do we need to add @Html.begin form tag to make ajax call
  Data here is getting populated before ajax call but not passed to controller 
  Do we need to update Route to make proper Ajax call ??
  Please suggest</p>