开发者

Get items in current page from ASP .NET PagedDataSource

开发者 https://www.devze.com 2023-03-07 17:26 出处:网络
I am impl开发者_如何学编程ementing paging on a custom server control, and I\'m wondering if I can use the PagedDataSource to my advantage. Is there a way to get the items just from the current page of

I am impl开发者_如何学编程ementing paging on a custom server control, and I'm wondering if I can use the PagedDataSource to my advantage. Is there a way to get the items just from the current page of the PagedDataSource? Will this work to do this?

For Each item As Object In pagedDataSource


I went ahead and tried this, and this does work. As long as you set up the PagedDataSource correctly (set AllowPaging, PageSize, and CurrentPageIndex, and, of course, DataSource), then you can use

For Each item As Object In pagedDataSource

to iterate through the current page of items.

0

精彩评论

暂无评论...
验证码 换一张
取 消