1: The pagination function cannot be used for the gridview with datareader as datasource. The reason should be that datareader does not implement the icollection interface.
2: when using the pagination function of the gridview, in addition to setting allowpaging = "true", you must also handle a pagdexdexchanging event (onpageindexchanging attribute ).
As for paging, it should be clear that automatic paging does not reduce the data size of database queries. On the contrary, each time a user changes the current page number, all data needs to be obtained and bound. In other words, if you divide a table into ten pages and the user browses each page in turn, you will have to execute the same job ten times (at the same time, the overall burden on the database is increased by ten times !) Therefore, the cache technology is used to improve performance.
The above is the case when the page is automatically paged by the gridview. You can also use custom pages to retrieve and bind records of the current page for the gridview.
Ah ah! So JB is complicated !!!!!!!!!!! Lao Tzu does not read