ASP.NET MVC中怎么把从数据库读出的数据列表进行分页显示? 10
这是控制器里的代码[HttpPost]publicJsonResultSearch(stringkey){sql10delangEntitiesdb=newsql10de...
这是控制器里的代码
[HttpPost]
public JsonResult Search(string key)
{
sql10delangEntities db = new sql10delangEntities();
var json = new
{
rows = (from a in db.dl_basic_lawcontent
orderby a.content_id
where a.content.Contains(key)
select a.content)
};
return Json(json, JsonRequestBehavior.AllowGet);
} 展开
[HttpPost]
public JsonResult Search(string key)
{
sql10delangEntities db = new sql10delangEntities();
var json = new
{
rows = (from a in db.dl_basic_lawcontent
orderby a.content_id
where a.content.Contains(key)
select a.content)
};
return Json(json, JsonRequestBehavior.AllowGet);
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询