Finding and displaying the requested record on the detail page (ASP and JSP)

Finding and displaying the requested record on the detail page (ASP and JSP)

After completing the master page (see Opening the detail page and passing a record ID to it (ASP and JSP)), you must find the requested record in the database and display it on the detail page. The procedure consists of defining a recordset to hold a single record--the record requested by the master page--and binding the recordset columns to the page.

To find and display the requested record on the detail page:

  1. Switch to the detail page, or create a new ASP or JSP page if it doesn’t exist yet.
  2. In the Bindings panel (Window > Bindings), click the Plus (+) button and select Recordset from the pop-up menu.

    The simple Recordset dialog box appears. If the advanced dialog box appears instead, click Simple to switch.

  3. Name the recordset, then select a connection and database table that will provide data to your recordset.
  4. In the Column area, select the table columns to include in the recordset.

    The recordset can be identical to or different from the recordset on the master page. Usually a detail page recordset has more columns to display more detail.

    If the recordsets are different, the recordset on the detail page should contain at least one column in common with the master page. The common column is usually the record ID column, but it can also be the join field of related tables.

    To include only some of the table’s columns in the recordset, click Selected and select the desired columns by Control-clicking (Windows) or Command-clicking (Macintosh) them in the list.

  5. Complete the Filter section as follows to find and display the record specified in the URL parameter passed by the results page:
    • From the first pop-up menu in the Filter area, select the column in the database table containing values that match the value of the URL parameter passed by the master page.

      For example, if the URL parameter contains a record ID number, select the column containing record ID numbers.

    • From the pop-up menu beside the first menu, select the equal sign (it should already be selected).
    • From the third pop-up menu, select URL Parameter.

      The master page passes information identifying the user’s selection to the detail page in a URL parameter.

    • In the fourth text box, enter the name of the URL parameter passed by the master page.

      For example, if the URL the master page used to open the detail page is, then enter id.

      You can also get the name by switching to the master page, opening the Server Behaviors panel (Window > Server Behaviors), and double-clicking the Go to Detail Page server behavior. Check the Pass URL Parameter name.

  6. Click OK.

    The recordset appears in the Bindings panel.

  7. Bind the recordset columns to the detail page by selecting the columns in the Bindings panel (Window > Bindings) and dragging them onto the page.

The master/detail page set is done.

After creating master/detail page, you can use the Server Behaviors panel (Window > Server Behaviors) to modify the various server behaviors.

Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly
Building ColdFusion Applications Rapidly
Building ASP.NET Applications Rapidly
Building ASP and JSP Applications Rapidly