I am pretty sure I checked all my alternatives but I cant seem to find a way to do server side paging with ListView control and DataPager. Most of my existing code base does not use object datasource or LinqDataSource control which exposed a property called SelectCountMethod that gets the value of the total rows available for that select clause. Usually for server side paging you provide the rows which the user can see which is the startrow and maximum rows and than for the DataPager to build its UI, you provide method for SelectCountMethod that retrieves the count of actual rows available. But how do you accomplish this task when you are not using objectdatasource control. Well DataPager exposes a property called TotalRowCount whose value get set by the object datasource or linq datasource control. However this property is only readonly, which you cannot set if you are manually binding the ListView Control. I am not sure why the architecture was done this way which forces the use of a specific control to achieve server side paging.
Cant Do ServerSide paging With DataPager
最新推荐文章于 2025-12-28 14:52:19 发布
本文探讨了在ASP.NET中使用ListView控件和DataPager实现服务器端分页的难题。作者指出,在不使用ObjectDataSource或LINQDataSource的情况下很难实现这一功能,因为这些控件提供了获取总记录数的方法。
1万+

被折叠的 条评论
为什么被折叠?



