Angular ui. bootstrap. pagination page, angularuibootstrap
The examples in this article share the code of Angular Paging for your reference. The details are as follows:
1. Html
<! DOCTYPE html>
2. Action
[HttpPost] public JsonResult GetPageList(int pageIndex, int pageSize, string name) { int pageCount = 1; int recordTotal = 0; int topRecordTotal = 0; List<Students> list = new List<Students>(); 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); }
:
The above is all the content of this article. I hope it will be helpful for your learning and support for helping customers.