Dreamweaver

Build a master page

Before you start, ensure that you define a database connection for your site.

  1. To create a blank page, select File > New > Blank Page, select a page type, and click Create. This page becomes the master page.
  2. Define a recordset.

    In the Bindings panel (Windows > Bindings), click the Plus (+) button, select Recordset (ColdFusion, PHP) or DataSet (ASP.NET), and choose options. If you want to write your own SQL statement, click Advanced.

    Ensure that the recordset contains all the table columns you need to create your master page. The recordset must also include the table column containing the unique key of each record—that is, the record ID column. In the following example, the Code column contains the unique key of each record.

    Recordset columns selected for a master page

    Typically, the recordset on the master page extracts a few columns from a database table while recordset on the detail page extracts more columns from the same table to provide the extra detail.

    The recordset can be defined by the user at run time. For more information, see Building search and results pages (ColdFusion, ASP, JSP, PHP).

  3. (ColdFusion, PHP) Insert a dynamic table to display the records.

    Place the insertion point where you want the dynamic table to appear on the page. Select Insert > Data Objects > Dynamic Data > Dynamic Table, set the options, and click OK.

    If you don’t want to show record IDs to users, you can delete the column from the dynamic table. Click anywhere on the page to move the focus to the page. Move the cursor near the top of the column in the dynamic table until the column cells are outlined in red, and then click to select the column. Press Delete to delete the column from the table.

  4. (ASP.NET) Create a DataGrid to display the records.

    In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button, and select DataGrid. Accept the default column type of Simple Data Field for each column in your DataGrid. The following example shows three columns defined for a DataGrid:

    An example showing three columns defined for a DataGrid.