title: JQuery.Ajax and MVC4
body: <p>I have a need to call a method on my controller to return a complex type using the JQuery.Ajax method.</p>
  
  <pre><code> function CallMethodTest(Id) {
              //alert(Id);
              $.ajax({
                  type: 'POST',
                  url: '/MyController/MyMethod',
                  dataType: "json",
                  contentType: "application/json; charset=utf-8",
                  //data: "{'Id': '" + Id + "'}",
                  success: function (data) {
                      alert(data);
                  },
                  error: function (xhr, ajaxOptions, thrownError) {
                      alert(xhr.status);
                      alert(thrownError);
                  }
              });
          }
  
  [System.Web.Services.WebMethod]
  public string MyMethod()
  {
      return "ABC"; // Gives me the error on the first alert of "200" and the second alert "Syntax Error: Invalid Character"
      return "1"; // Works fine
  }
  </code></pre>
  
  <p>As the code explains, if I return an integer (as a string) the return works and I alert "1", however, If I try and return any alpha characters I get the alerts shown in the comments of MyMethod.</p>