Datasheet
Displaying Data Using the Code Wizards
There are times where both the drag and drop from the Data Explorer and the template pages cannot
provide you with exactly what you need. Perhaps you'd like to customize the query, or just add a
routine to fetch data to an already existing page. The code wizards allow you to add code routines to a
page, giving you a finer control of the data being fetched or updated. Let's give this a go.
Try It Out Creating a Data Page
1.
Create a new blank ASP.NET page called CodeWizard.aspx.
2. Switch to Code view and you'll notice that the Toolbox now shows Code Wizards as shown in
Figure 8-7:
Figure 8-7
3. Pick the SELECT Data Method and drag it from the Toolbox, dropping it into your code window.
This starts the wizard, and the first screen as shown in Figure 8-8 is where you pick the database
to connect:
Figure 8-8
262
Chapter 8
57084_08.qxp 30/01/2004 8:03 PM Page 262