If you want to, click Test to create an instance of the DataSet using the default variable values.
6
The default values simulate the values that would otherwise have been returned from the
search page. Click OK to close the test DataSet.
If you're satisfied with the DataSet, click OK.
7
Dreamweaver inserts the SQL query in your page.
The next step is to display the search results in a DataGrid.
Displaying the results in a DataGrid
After creating a DataSet to hold the search results, you can use a DataGrid to display the
information on the page.
To display the search results in a DataGrid:
On the search page, place the insertion point where you want the DataGrid to appear.
1
In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button and
2
select DataGrid.
The DataGrid dialog box appears.
In the ID text box, enter a name for the DataGrid such as dgLocation.
3
In the DataSet pop-up menu, select the DataSet you defined to hold the search results.
4
Complete the rest of the dialog box as desired.
5
For more information, click the Help button on the dialog box.
Here's an example of a DataGrid dialog box that will create a DataGrid with three columns and
ten rows, and links to previous and next pages of results.
The DataGrid will appear the first time the search page loads even if the user hasn't conducted a
search yet. You can hide the DataGrid when the page loads the first time.
684
Chapter 41: Building ASP.NET Applications Rapidly
Need help?
Do you have a question about the DREAMWEAVER MX 2004-USING DREAMWEAVER and is the answer not in the manual?
Questions and answers