I have a simple method in my MVC controller:
[HttpPost]
public JsonResult GetAreasForCompany(int companyId)
{
var areas = context.Areas.Where(x => x.Co
Return List Object as Json (Also useful for JqueryUI and Linq Method)
public ActionResult GetItemList()
{
var search = Request.Params["term"];
var itemList = (from items in db.TblItems where items.ItemName.StartsWith(search) select new { label = items.ItemName, value = items.ItemName }).ToList();
return Json(itemList, JsonRequestBehavior.AllowGet);
}