This section describes how to create a master page that lists database records. With ASP.NET, you can use a DataGrid to list the records on the page.
Before you start, make sure you define a database connection for the site. For more information, see Database Connections for ASP.NET Developers.
Select File > New > Dynamic, select an ASP.NET page format, and click Create. A blank .aspx page opens in Dreamweaver.
In the Bindings panel (Window > Bindings), click the Plus (+) button, select DataSet (Query), and complete the dialog box. For more information, click the Help button on the dialog box. If you want to write your own SQL statement, click the Advanced button to open the advanced DataSet dialog box.
Make sure the DataSet contains all the table columns you need to create your master page.
The DataSet must also include the table column containing the unique key of each record--that is, the record ID column.
Typically, the DataSet on the master page extracts a few columns from a database table while the DataSet on the detail page extracts more columns from the same table to provide the extra detail.
The DataSet can be defined by the user at runtime. For more information, see Building a database search page (ASP.NET).
In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button, select DataGrid, and complete the DataGrid dialog box. For more information, click the Help button on the dialog box. For now, accept the default column type of Simple Data Field for each column in your DataGrid. In the next section, youll change the type of one column to Hyperlink (see Opening a detail page and passing a record ID (ASP.NET)).
Heres an example of a DataGrid dialog box that defines three columns.
The next step in creating master/detail pages is to create links that open the detail page and pass the ID of the record the user selected. See Opening a detail page and passing a record ID (ASP.NET).