私は ActionResult メソッドを持っています:
public ActionResult GetData(int id)
{
return Json(CreateCompaniesList(), JsonRequestBehavior.AllowGet);
}
jQuery get メソッドでアクセスしたい。
それがただの場合:
public ActionResult GetData()
{
return Json(CreateCompaniesList(), JsonRequestBehavior.AllowGet);
}
次のようにアクセスできます:
function drawChart() {
$.get('/Home/GetData', {},
ActionReuslt メソッドにパラメーターがある場合に同じことを行う方法は?