title: jQuery ajax call to MVC controller
body: <p>I've made this work before so I'm not entirely sure what's up. It has been sometime now since I've done this. Basically taking a value from a dropdown, passing it into the ajax call then pushing it off to the Controller to render a partial view.. I am getting no errors and the partial view is simply blank. Where have I gone wrong?</p>
  
  <p>Here's the jQuery:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
   $(document).ready(function () {
  
       $('#selectTable').change(function () {
           var selectTables = $('#selectTable');
           var selectedOption = selectTables.find('option:selected').val();
           //pass selected table to controller
           $.ajax({
               type: "POST",
               url: "/Home/GetTableObject",
               data: JSON.stringify({ selectedTable: selectedOption }),
               contentType: "application/json; charset=utf-8",
               dataType: "html",
               success: function (data) {
                   $('#ViewDetails').html(data);
               }
  
           });
       });
  
   });
  </code></pre>
  
  <p></p>
  
  <p>And here's the controller:</p>
  
  <pre><code>public ActionResult GetTableObject(string selectedTable)
      {
          AO ao = new AO((IPrincipalBO)Session["principle"]);
          Table THETABLE = new Table();
          THETABLE = ao.GetTableObject(selectedTable);
  
          if (Request.IsAjaxRequest())
          {
              return PartialView("_TableDetails", THETABLE);
  
          }
          else
          {
              //return null;
              return View(THETABLE);
          }
  </code></pre>