Morning, there was a look at MSDN, and saw the
PagedDataSource class
Http://msdn.microsoft.com/zh-cn/library/system.web.ui.webcontrols.pageddatasource (v=vs.110). aspx
Recall the previous insus.net only the GridView and DataList controls are customized for paging. The GridView and DataList pagination component and user control http://www.cnblogs.com/insus/archive/2009/03/19/1417102.html have never thought about paging repeater controls. Just use the Repeater control as a binding pen record or some small data set.
See the MSDN Page class today, and do not see Microsoft to the Repeater control listed in the introduction, is it true that the repeater control can not be paginated it?
See Demo:
Prepare the data source from the database first:
There is an instantiation class BIZBASESQLSP, this class specifically implemented, you can refer to the ASP. NET development, from two to three layers to object-oriented (3) "http://www.cnblogs.com/insus/p/3826706.html
Set a style (style) for the Repeater control:
When you create the Repeater control:
To set the paging status:
Now we can implement the code for the. CS page, implementing the paging state and binding to the Reeapter control, before implementing a property that needs to be written in order to store the index of the current page paged:
To implement paging and data-bound controls:
There are also two button events that are not implemented and are completed below:
Implementation Demo: