title: Getting undefined result on ajax success
body: <p>I am trying to call my controller by jquery ajax.My controller action method.My ajax is runnig successfully and my method is being called but it responses with a undefined result.Can anyone help me out with this
  My Ajax Code is </p>
  
  <pre><code>$.ajax({
    url: url,
    data: data,
    type: "POST",
    contentType: "application/json;charset=utf-8",
    dataType: "json",
    async: false,
    success: function(res) {
      alert(res.d);
    },
    error: function(res) {
      alert(res.status);
    }
  })
  </code></pre>
  
  <p>it calls to a student controller which have a action method named create which is defined as below
  [HttpPost]</p>
  
  <pre><code>public JsonResult Create(string name)
      {
          return Json(name,JsonRequestBehavior.AllowGet);
      }
  </code></pre>