Using the SELECT Data Method Code Builder to Generate the GetCustomers() Function

The next step is to generate the function that will return the database data with which to populate the DataGrid. As we've seen in a number of previous hours, this can be easily accomplished using the SELECT Data Method Code Builder, here as follows:

1.
Click the Code tab of the EditDataGrid.a spx Web page and drag and drop the SELECT Data Method Code Builder from the Toolbox and onto the source code portion of the ASP.NET Web page.
2.
Construct the SELECT query such that it returns all columns from the Customers table. Figure 20.5 shows a screenshot of the query constructed by the SELECT Data Method Code Builder.
Figure 20.5. The SELECT query returns all rows from ...

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.