Build master and detail pages in one operation – Adobe Dreamweaver CC 2015 User Manual
Page 647
640
Building applications visually
Last updated 6/3/2015
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.
After uploading both the master and detail pages to the server, you can open the master page in a browser. After
clicking a detail link on the master page, the detail page opens with more information about the selected record.
Find a specific record and display it on a page (ASP)
You can add a server behavior that finds a specific record in a recordset so that you can display the record data on the
page. The server behavior is only available when using the ASP server model.
1
Create a page that has the following prerequisites:
• A record ID contained in a URL parameter passed by another page to the current page. You can create URL
parameters on the other page with HTML hyperlinks or with an HTML form. For more information, see
.
• A recordset defined for the current page. The server behavior extracts the record details from this recordset. For
instructions, see or .
• Recordset columns bound to the page. The specific record must be displayed on the page. For more information,
see .
2
Add the server behavior to find the record specified by the URL parameter by clicking the Plus (+) button on the
Server Behaviors panel (Window > Server Behaviors) and selecting Recordset Paging > Move to Specific Record.
3
In the Move To Record In pop-up menu, select the recordset you defined for the page.
4
In the Where Column pop-up menu, select the column that contains the value passed by the other page.
For example, if the other page passes a record ID number, select the column containing record ID numbers.
5
In the Matches URL Parameter box, enter the name of the URL parameter passed by the other page.
For example, if the URL the other page used to open the detail page is id=43, enterid in the Matches URL Parameter
box.
6
Click OK.
The next time the page is requested by a browser, the server behavior will read the record ID in the URL parameter
passed by the other page and move to the specified record in the recordset.
Build master and detail pages in one operation
When developing web applications, you can quickly build master and detail pages using the Master Detail Page Set data
object.
1
To create a blank dynamic page, select File > New > Blank Page, select a dynamic page from the Page Type list, and
click Create.
This page becomes the master page.
2
Define a recordset for the page.
Make sure the recordset contains not only all the columns you’ll need for the master page, but also all the columns
you’ll need for the detail page. Typically, the recordset on the master page extracts a few columns from a database
table while the recordset on the detail page extracts more columns from the same table to provide the extra detail.
3
Open the master page in Design view, and select Insert > Data Objects > Master Detail Page Set.