Current location - Loan Platform Complete Network - Big data management - asp.net (c#) datalist realize paging
asp.net (c#) datalist realize paging
Only provide some ideas.

Often do large amounts of data paging, in the sql control is best. This is often referred to as a three-tier architecture, with layers of parameters being passed down and values being uploaded.

Intermediate logic processing layer can write methods, parameters can be set as follows: query conditions, the number of records displayed on each page, the current page number (API index value from 0), the total number of records (out type).

The underlying data access layer to build the query statement, the page number as a parameter, similar to select top @XX from YYY where @zzz

Page background can be written to turn the query, through the click on the event to control the current page number of the data passed to the logical layer.

It is not easy to realize, there may be a better way, but it is more important to develop good programming habits than to realize a function, you say?