title: Passing parameters in ajax call
body: <p>I'm trying to make an ajax call to the controller method. without parameter it works fine. Once i add the parameter i always receive a null parameter to the cotroller. I think i have correctly done the parameter passing in ajax call.</p>
  
  <pre><code> &lt;script type="text/javascript"&gt;
          $(document).ready(function () {
              $('#lstStock').change(function () {
                  var serviceURL = '&lt;%= Url.Action("GetStockPrice", "Delivery") %&gt;';
                  var dropDownID = $('select[id="lstStock"] option:selected').val();
               alert(dropDownID); // here i get the correct selected ID
                  $.ajax({
                      type: "POST",
                      url: serviceURL,
                      data: '{"stockID":"' + dropDownID + '"}',
                      contentType: "application/json; charset=utf-8",
                      dataType: "json",
                      success: successFunc,
                      error: errorFunc
                  });
  
                  function successFunc(data, status) {
  
                      alert(data.Result);
  
  
                  }
  
                  function errorFunc() {
                      alert('error');
                  }
              })
          });
      &lt;/script&gt;
  </code></pre>
  
  <p>Controller:</p>
  
  <pre><code> [HttpGet]
          public ActionResult GetStockPrice()
          {
              return View();
          }
  
          [HttpPost]
          [ActionName("GetStockPrice")]
          public ActionResult GetStockPrice1(string stockID)//I get the null parameter here
          {
              DeliveryRepository rep = new DeliveryRepository();
              var value = rep.GetStockPrice(stockID);
              return Json(new { Result = value }, JsonRequestBehavior.AllowGet);
  
          }
  </code></pre>