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 how to take the first step: Design a page to display the database information—with HTML as its backbone. You can do this in a 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, Cold Fusion, PHP, or whatever. When you save the file, Dreamweaver automatically adds the proper extension: .asp for ASP, .aspx for ASP.NET, .cfm for Cold Fusion, .jsp for JSP, or .php for PHP pages.

    You can then use any of the page building tools described earlier in this book—tables, Cascading Style Sheets, Library items, and so on—to design the page. Even though the file may officially be, say, 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 and with the proper extension.

Note

Just renaming a file in the Site panel (from about.html to about.asp, for example) does not add the code at the beginning of the file necessary to apply the correct server model to the page. Changing the file’s extension (from .asp to .php, for ...

Get Dreamweaver MX: The Missing Manual now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.