it fails silently….
Microsoft should put a couple of exclaimation marrk for this documentation somewherem, so we can see to save us sometime!!!!!!!!!!!!!!!!!!!!!!!!!

Example:
If you call getJSON in client side:
$.getJSON(‘/Home/GetList’, { id: $("#country").val() },
You have to create an action in controller in following:
public JsonResult GetList(string id)
{
return Json(test.ToList());
}

But if you:
public JsonResult GetList(int id)
{
return Json(test.ToList());
}

You got nothing!!!!!!!!!!!!!!!!

Advertisements