21.5 Creating a Dynamic Page
Once you've set up an application server and database server, you're ready to connect
to the database, retrieve information, and display it on a Web page.
You already know the first step: Design an HTML page to display the database information.
You can do this in any number of ways:
Choose FileNew to open the New Document window. Click the Dynamic Page
category and double-click the appropriate dynamic page type: ASP VBScript,
ColdFusion, PHP, or whatever. When you save the file, Dreamweaver automatically
adds the proper extension: .asp for ASP pages, .aspx for ASP.NET, .cfm for
ColdFusion, .jsp for JSP, or .php for PHP pages.
You can then use any of the page building tools described in this book梩ables,
Cascading Style Sheets, Library items, or whatever梩o design the page. Even
though the file's officially an ASP page, it still contains lots of HTML. Unlike a
plain-vanilla HTML page, though, this one also contains the server-side programming
code that lets the page communicate with a database.
Right-click (Control-click) in the Site panel; choose New File from the contextual
menu. Dreamweaver creates a file in the correct server model format, with the
Just renaming a file in the Sites panel (from about.html to about.asp, for example) does not give the
file the code necessary to apply the correct server model to the page. Changing the file's extension (from
.asp to .php, for example) doesn't change the page to the new server model, either, and will probably
"break" the page.
You can edit the newly created page using either Design view or Code view. But
before you can add dynamic content to a page, you must create a connection to a