ASP. NET MVC Custom pager encapsulation and optimization introBefore doing a common paging component, but some of the shortcomings, from page-flipping events and page styles are fused in the background code, to page flip event can be customized, and
This example for you to share the jquery pager page of the specific implementation code, for your reference, the specific contents are as follows
Effect Chart:
Code:
HTML code:
Pager
CSS code:
.
The example effect diagram is as follows
Instructions for use
Need to use jquery library files and jquery pager library files (current version 1.1)
Material Preparation
The pager CSS style file, which can be copied as the following CSS
The instance is as follows:Instructions for use The jQuery library file and the JQuery Pager library file must be used (current version 1.1)Material Preparation The CSS sample file of the sub-page, which can be copied as the CSS sample and named
The instance is as follows:
Instructions for use The jQuery library file and the JQuery Pager library file must be used (current version 1.1)
Material Preparation The CSS sample file of the sub-page, which can be copied as the CSS sample and named
///
/// Set the pager format of the DataGrid
///
/// DataGrid to be processed
/// itemcreated event parameters of the datagride
Public static void datagridpageset (DataGrid dgmain, system. Web. UI. webcontrols. datagriditemeventargs E)
{
If (E.
ASP. NET paging control 2.0 (Ling. pager)
Main features:
Built-in paging class library perfectly supports complex SQL PagingSupports event paging and URL paging (non-event)Supports the default, Chinese, and English language modes.The default
The basic logical idea is the same as. NET, which is to configure through the entity class to be configured through an array, logic is relatively simple, based on the criteria to determine the stitching of the paging HTML.
Here are a few simple
The basic logical thinking and. NET, is to be configured through the entity classes replaced by the array configuration, the logic is relatively simple, based on the conditions to determine the Mosaic page HTML.
Here are a few simple features:
1:
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.