title: How to serialize model, pass it to MVC controller in ajax request
body: <p>I'm trying to pass my page's model to my controller for processing. 
  After processing the information, I want to update the div of id "savedText" to display "Billing Information saved successfully."</p>
  
  <p>I have this in my view</p>
  
  <pre><code>function testingFunction() {
      var obj = $('testForm').serialize();
  
      $.ajax({
          url: '@Url.Action("TestingFunction", "BuildGiftCard")',
          dataType: 'json',
          success: function (result) {
              $("#savedText").html(result);
          },
          contentType: 'application/json; charset=utf-8',
          data: JSON.stringify(obj)
      });
  
      return false;
  }
  </code></pre>
  
  <p>and I have this in my controller:</p>
  
  <pre><code>[HttpPost]
  public JsonResult TestingFunction(PurchaseModel model)
  {
      return Json("Billing information saved successfully.");
  }
  </code></pre>
  
  <p>what am I doing wrong?</p>
  
  <p>When "inspecting element" in chrome, in the network tab, it's saying that my controller method isn't found.</p>
  
  <p>Also, it's important for me to get the entire model from the view into the controller's function (TestingFunction in this case) so that I can get the form information and save it. I'm trying the .serialize() function but that results in obj = (empty string).</p>