|
Active Server Pages lets you freely mix HTML tags and "script"
(ASP commands) on a page. An .asp extension
at the end of page's file name indicates that Sun ONE Active Server Pages
should process the contents of the file. On this page, VBScript is used
to display the Session variable containing your name. Click View ASP
Source to see the actual code in use, the ASP script is shown in red.
Pages created using ASP can be considered a superset of HTML pages. Because
any valid HTML page is also a valid ASP page, developers signal the Web
server to pass the page to the Sun ONE Active Server Pages Server by giving
the page an .asp file name extension, instead
of an .htm or .html
extension. When you give an HTML page an .asp extension, the Web server
passes the page to the ASP Server for execution. However, since the page
contains only plain HTML, the ASP Server has no task to perform other
than returning the HTML in the same format in which it was received.
By converting an HTML page to an .asp page and adding some scripting,
you have now created a dynamic page. In other words, Sun ONE Active Server
Pages commands are issued through a script that is embedded in the HTML
code. Dynamic content becomes a matter of writing the appropriate script
to manipulate, arrange, and add to the existing HTML code.
|
|
|