title: how to get ajax data from mvc controller
body: <p>I want to get the value in my controller from ajax.  I set a break point in the controller and it breaks, but the value is not there.  Am I missing something in my code or do I need to change something?</p>
  
  <p>Here is my controller code:</p>
  
  <pre><code>            [HttpPost]
      public ActionResult SubmitResponse(string responseData)
      {
          string test = responseData;
  
          return View();
  
      }
  </code></pre>
  
  <p>here is my ajax code:</p>
  
  <pre><code>        $( "#dialog-form" ).dialog({
              autoOpen: false,
              height: 500,
              width: 900,
              modal: true,
              buttons: {
                  "Submit": function () {
  
                      var response = $.trim($('#name').val());
  
                      //responseData = JSON.stringify(responseData);
  
                      alert('response data = ' + response + '!!!');
                      //alert('YES');
                      $.ajax({
                          url: 'Questions/SubmitResponse',
                          type: 'POST',
                          data: JSON.stringify(response),
                          dataType: 'json',
                          contentType: 'application/json; charset=utf-8',
                          success: function(){
                              alert('success');
                          },
                          error: function(){
                              alert('error buddy');
                          }
                      });
                  },
  </code></pre>