$(document).ready(function () {
$('#mpvalue').autocomplete({
source: '@Url.Action("GetMP")'
});
})
public ActionResult Index()
{
return View();
}
public ActionResult GetMP(string term)
{
var result = from r in _db.GetMPDetails()
where
r.Name.ToLower().Contains(term)
select r.Name;
return Json(result, JsonRequestBehavior.AllowGet);
}