本文实例为大家分享了Angular 分页的具体代码,供大家参考,具体内容如下
1、Html
rush:xhtml;">
MyPagination
查询
ottom: 0px;">
显示第一个/最后一个按钮*@
rotate="false"
prevIoUs-text="‹"
next-text="›">
2、Action
rush:js;">
[HttpPost]
public JsonResult GetPagelist(int pageIndex,int pageSize,string name)
{
int pageCount = 1;
int recordTotal = 0;
int topRecordTotal = 0;
List list = new List();
try
{
list = svc.GetAllStudent();
recordTotal = list.Count();
pageCount = (int)Math.Ceiling((decimal)recordTotal / pageSize);
topRecordTotal = (pageIndex - 1 < 0 ? 0 : pageIndex - 1) * pageSize;
list = list.Skip(topRecordTotal).Take(pageSize).ToList();
}
catch (Exception)
{
throw;
}
return Json(new
{
pageIndex = pageIndex,pageCount = pageCount,recordTotal = recordTotal,Data = list,},JsonRequestBehavior.AllowGet);
}
效果图:
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持编程之家。
相关文章
Bootstrip HTML 查询搜索常用格式模版 <form class=&...
如何在按钮上加红色数字 您可以使用Bootstrap的badge组件来在...
要让两个按钮左右排列,你可以使用 Bootstrap 的网格系统将它...
是的,可以将status设置为布尔类型,这样可以在前端使用复选...
前端工程师一般用的是Bootstrap的框架而不是样式,样式一般自...
起步导入:<linkrel="stylesheet"href="b...