Paging

Few companies’ catalogs can fit on a single Web page. Say you set up a search engine for your product catalog and a hundred items fit the search criteria that the user specified. Rather than provide links to all products on the resulting Web page, you’ll probably want to break up the results into a series of pages and display the contents of only the first page.

Displaying just the first page is generally simple. But how do you supply functionality to allow the user to move to the next page of the result set or to move to a specific page?

ASP.NET and ADO.NET offer features that can help you serve up the results of your queries one page at a time. Let’s look at those features now.

Paging Features of the GridView Control

As shown earlier in the ...

Get Programming Microsoft® ADO.NET 2.0 Core Reference, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.