Graphics Programs Reference
Trouble? When you save an .html file as an .asp page, Dreamweaver does not
insert code that might be necessary to identify the ASP scripting language at the
top of the page. If you have an ASP VBScript site, an .asp file requires the follow-
ing code at the top of the page: <%@LANGUAGE=”VBSCRIPT”%>. Without this
code, the page might not function on the server, and Dreamweaver might not rec-
ognize or add server behaviors correctly. Close the browser, switch the contact.
asp page to Code view, type the missing code at the top of the page, save and
close the page, reopen the contact.asp page in Dreamweaver, and then repeat
Steps 1 through 3.
4. Close the browser.
The page is connected to the database and the behaviors have been added to the
page. Next, you will create back-end pages to view the data collected in the database.
Creating Back-End Pages for Viewing Data in a Database
Pages that are intended for internal use are usually called back-end pages . For the
NextBest Fest site, the database.asp and database_details.asp pages are back-end pages.
You will set the database.asp and database_details.asp pages to display the data that you
collect in the database.
The Master Detail Page Set button in the Data category of the Insert panel enables you
to create a set of pages that presents information in two levels of detail. The master page
(in this case, the database.asp page) lists all the records in the recordset that you create
for the page. The detail page (in this case, the database_details.asp page) displays the
detail of the selected record. You determine which fi elds of information are displayed in
the master page and which fi elds of information are displayed in the detail page when
you set the parameters for the pages.
In addition to creating all the code needed to display the dynamic content in the
pages, Dreamweaver also adds server behaviors to create a page navigation bar so you
can move between the dynamic records if more records are in the database than are
displayed in the page. The navigation bar includes First Page, Last Page, Previous Page,
and Next Page buttons. The pages also include Display Record Count server behaviors
to indicate which records are visible in the page and the total number of records in the
database (Records x to y of z ).
To create the master page:
1. In the Server Behaviors panel, click Recordset , right-click the selected behavior,
and then click Copy on the context menu.
2. Open the database_details.asp page in Design view, right-click in the Server
Behaviors panel, and then click Paste on the context menu. The Recordset behav-
ior is pasted in the database_details.asp page.
3. Place the insertion point in the heading line after the heading text, press the
Right arrow key to move the insertion point past the heading text, and then press
the Enter key to move the insertion point to the next line.
Trouble? If Dreamweaver locks up, you've encountered a bug that causes the
program to lock up if you place the insertion point in the line below the head-
ing and then press the Enter key when using server behaviors. End the program,
restart the computer, and then repeat Steps 1 through 3.