DataList and DataRepeater paging

zhaozj2021-02-12  199

The DataList and DataRepeater in ASP.NET provide simple and quick ways to display, between us, we can use to make us feel free to control data from the heart! Unfortunately, they don't have a built-in paging function as DataGrid. How to solve it?

In fact, we can [PageDataSource] class to solve the problem of paging. The properties of the PagedDataSource class:

DataSource - Data Source AllowPaging - True Whether to Allow Page .pagesize - Number of items per page PageCount - Total number

CurrentPageIndex - The current page of the current is as follows:

<% @ Page language = "VB"%> <% @ import name "%>