Custom Pagind and Navigating to the Last Page
Scott Mitchell just published another great set of Working with Data in ASP.NET 2.0 tutorials. It´s a must read for every .Net 2.0 Framework developer out there.
My latest set of Working with Data in ASP.NET 2.0 tutorials focused on paging and sorting data and included a look at implementing custom paging (with sorting) with the GridView and ObjectDataSource. Alert reader Mark Fox pointed out that there's a bit of a problem when using custom paging and clicking the Last page link in the paging interface:
For lesson 25 – Efficient Paging I downloaded the file ASPNET_Data_Tutorial_25_VB.exe and than opened the project in VS 2005 Standard and ran PagingAndSorting/EfficientPaging.aspx. Clicking the PageLast >> button in GridView1’s pager gives a System.OverflowException in System.Web.UI.WebControls.GridView.CreateDataSourceSelectArguments().
Enabling the viewstate in GridView1 fixes this.
To read more about it click here.
Technorati Tags: ADO.Net - ASP.Net - 2.0 - .Net - Framework - Data - Paging
