Testing the ASP.NET Web Page

At this point we have added a DataGrid to the ASP.NET Web page and specified that it be sortable. We have added a function to return the contents of the Books database table in a specified sorted order, and we have created an event handler for the DataGrid's SortCommand event. Whew! Accomplishing all of these tasks took quite a bit of time and explanation, but our hard work has paid off—we now have a sortable DataGrid!

Save the ASP.NET Web page and view it through a browser. When you first load the page, the data will be sorted by the Title column (assuming you did not change the Page_Load event handler). Figure 18.8 shows a screenshot of the ASP.NET Web page when first loaded in a Web browser.

Figure 18.8. The books ...

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.