Home >Backend Development >C#.Net Tutorial >Detailed explanation of the use of ASP.NET synchronous paging MvcPager
I recently came into contact with MvcPager, let me take a note
Actually, I like the separation of front-end and back-end. The front-end is responsible for things like paging, and the back-end does not need a consultant. The MvcPager here reminds me a bit of server control. After all, HtmlHelper is used .
But it’s very convenient. . In the past, when we wrote paging, the backend would encapsulate a Page
1. To use the MvcPager control, you need the following support
1. Backend MvcPager.dll reference:
2. The front end requires Css: pagerstyles.css, and other theme style pictures, etc. (PS: My Demo Bootstrap is used) Js: Jq, jquery.unobtrusive-ajax.min.js, MvcPager.js (PS: Synchronous paging does not need to be quoted in full, asynchronous paging does need to be quoted, here we will quote it first)
Second, use the method ToPageList provided by MvcPager to perform paging query, retrieve the data, and return it to the front desk for display
Here, the PageList
Mainly this picture, the code for setting the paging bar. The paging function of MvcPager is used here, which is an extension of HtmlHelper.
3. Rendering