Authoring dynamic pages

Authoring dynamic pages

Authoring a dynamic page consists of writing the HTML first, and then adding the server-side scripts or tags to the HTML to make the page dynamic. When you view the resulting code, the language appears embedded in the page’s HTML. Accordingly, these languages are known as HTML embedded programming languages. The following basic example uses ColdFusion Markup Language (CFML):

<html>
   <head>
      <title>Trio Motors Information Page</title>
   </head>
   <body>
      <h1>About Trio Motors</h1>
      <p>Trio Motors is a leading automobile manufacturer.</p>
      <!--- embedded instructions start here --->
      <cfset department="Sales">
      <cfoutput>
      <p>Be sure to visit our #department# page.</p>
      </cfoutput>
      <!--- embedded instructions end here --->
   </body>
</html>

The embedded instructions on this page perform the following actions:

  1. Create a variable called department and assign the string "Sales" to it.
  2. Insert the variable’s value, "Sales", in the HTML code.

The application server returns the following page to the web server:

<html>
   <head>
      <title>Trio Motors Information Page</title>
   </head>
   <body>
      <h1>About Trio Motors</h1>
      <p>Trio Motors is a leading automobile manufacturer.</p>
      <p>Be sure to visit our Sales page.</p>
   </body>
</html>

The web server sends the page to the requesting browser, which displays it as follows:

About Trio Motors

Trio Motors is a leading automobile manufacturer.

Be sure to visit our Sales page.

You choose a scripting or tag-based language to use depending on the server technology available on your server. Here are the most popular languages for the five server technologies supported by Dreamweaver:

Server technology

Language

ColdFusion

ColdFusion Markup Language (CFML)

ASP.NET

Visual Basic

C#

Active Server Pages (ASP)

VBScript

JavaScript

Java Server Pages (JSP)

Java

PHP

PHP

For more information, see Choosing a server technology.

Dreamweaver can create the server-side scripts or tags necessary to make your pages work, or you can write them by hand in the Dreamweaver coding environment.



Getting Started with Dreamweaver
Dreamweaver Basics
Working with Dreamweaver Sites
Laying Out Pages
Adding Content to Pages
Working with Page Code
Preparing to Build Dynamic Sites
Making Pages Dynamic
Developing Applications Rapidly
 
ASPTreeView.com
 
Evaluation has Фі»µ·Аёіexpired.
Info...