Examining the Source Code Portion
Since we have added the DataGrid to the Web page, specified what columns it contains, set a number of formatting properties, and configured it for paging, we are ready to tackle the source code portion of the ASP.NET Web page.
First we will need to use the SELECT Data Method Code Builder to create a function that returns the guestbook entries via a DataSet. Start by clicking the Code tab of the ASP.NET Web page. Next drag and drop the SELECT Data Method Code Builder from the Toolbox and onto the source code portion, just as we have done numerous times before. When constructing the SELECT query, have all Columns returned from the GuestbookEntries table (see Figure 23.9). Name the function GetGuestbookEntries
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.