Datasheet

Developing Master and Detail Pages for ASP.NET
702
You need to define a database connection for the site before you create the
master page. See Book VII for details.
Creating a master page
To create an ASP.NET master page, follow these steps:
1. Create a new or open an existing ASP.NET page in Dreamweaver.
2. In the Bindings panel, click the plus (+) button and select DataSet
(Query) from the menu that appears.
The DataSet dialog box appears.
3. Complete the DataSet dialog box and then click OK.
Make sure to include all table columns that you need to create your
master page, including the unique key (Record ID column) for each
record.
A dataset is essentially the same thing as a recordset; see Book VIII,
Chapter 1 for more information on recordsets.
The new dataset appears in the Binding panel.
4. In the Server Behaviors panel, click the plus (+) button and select
DataGrid from the menu that appears.
The DataGrid dialog box opens.
5. Select the dataset source from the DataSet drop-down list and click OK.
You can leave the default column type as Simple Data Field. The
DataGrid dialog box for our example looks like Figure 1-10.
Figure 1-10:
The
DataGrid
dialog box
has the
Employee_
Dataset
selected.
52_781428 bk09ch01.qxp 6/19/06 11:46 AM Page 702