Summary

In this hour we created the final ASP.NET Web page for the online guestbook application ViewGuestbook.aspx. This Web page displays the existing guestbook entries, sorted in chronological order from the most recent to the oldest entries, through a pageable DataGrid.

To create the source code portion of this Web page, we used the SELECT Data Method Code Builder to generate the GetGuestbookEntries() function, which returns all of the records from the GuestbookEntries tables in the properly sorted order. Because the results are displayed in a pageable DataGrid, this function returns the data in a DataSet as opposed to a DataReader.

Along with the GetGuestbookEntries(), we created an event handler for the DataGrid's PageIndexChanged event. ...

Get SAMS Teach Yourself ASP.NET in 24 Hours 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.