DataList page

xiaoxiao2021-03-06  125

DataList and DataRePeater in ASP.NET provide simple and quick ways to display, between them, we can use

What makes us can emissions from the control data you want! 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 is allowed to paginize.

Pagesize - Number of items per page

PageCount - Total number of pages

CurrentPageIndex - current page of the page

code show as below:

<% @ Page language = "vb"%>

<% @ Import namespace = "system.data"%>