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 O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.