[英]Implementing AutoComplete Jquery-ui-in mvc4 using Razar syntax
Just impemented the function of jquery-ui and working fine but the problem is "now i want selected value to be display like a details page ! i unable play with razar syntax of jquery what i have done..: 只是增加了jquery-ui的功能并正常工作,但问题是“现在我希望所选值像详细信息页面一样显示!我无法使用jquery的razar语法进行操作。.:
@model ExampleAutoComplete.Models.tblStudent<div class="row">
@Html.LabelFor(m => m.Name)
@Html.TextBoxFor(m => m.Name, new { data_autocomplete_url = Url.Action("GetStudents") })
action method: 动作方法:
public ActionResult Index()
{
return View();
}
public JsonResult GetStudents(string term)
{
StudentsDb db = new StudentsDb();
List<string> list;
list = db.tblStudents.Where(x => x.Name.StartsWith(term)).Select(y => y.Name).ToList();
return Json(list, JsonRequestBehavior.AllowGet);
}
Note: i want to display only selected value record in details View! 注意:我只想在详细信息视图中显示选定的值记录!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.