Paging Through Data

When working with a large number of database rows, it is useful to display the rows in different pages. You can enable paging with the GridView control by enabling its AllowPaging property.

For example, the page in Listing 11.9 enables you to page through the records in the Movies database table (see Figure 11.6).

Figure 11.6. Paging through records in a GridView control.

image

Listing 11.9. PageGrid.aspx

images

The GridView in Listing 11.9 displays three database records per page. You can modify the number of records displayed per page ...

Get ASP.NET 4 Unleashed 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.