Opening the detail page and passing a record ID to it (ASP and JSP)
After creating the master page and displaying records on it (see Displaying the records on the master page (ASP and JSP)), you must create links that open the detail page and pass the ID of the record the user selected to the detail page.
To open the detail page and pass it a URL parameter identifying the record to display:
- In the repeated region on the master page, select the dynamic content to double as a link.
- In the Server Behaviors panel (Window > Server Behaviors), click the Plus (+) button, and select Go to Detail Page from the pop-up menu.
The Go to Detail Page dialog box appears.
- Complete the dialog box.
For more information, click the Help button in the dialog box.
- Click OK.
Dreamweaver places a special link around the selected text. When the user clicks the link, the Go To Detail Page server behavior passes a URL parameter containing the record ID to the detail page. For example, if the URL parameter is called id and the detail page is called customerdetail.asp, then the URL will look something like the following when the user clicks on the link:
The first part of the URL, http://www.mysite.com/customerdetail.asp, opens the detail page. The second part, ?id=43, is the URL parameter. It tells the detail page what record to find and display. The term id is the name of the URL parameter and 43 is its value. In this example, the URL parameter contains the records ID number, 43.
For more information, see URL parameters.
The next step in creating master/detail pages is to find and display the requested record on the detail page. See Finding and displaying the requested record on the detail page (ASP and JSP).