ASP: A Demonstration
The actual interpretation of the web page by the ASP.DLL ISAPI filter is best explained by example. Example 1.1 shows a simple active server page, Sample.ASP. In this example, three pieces of server-side code, indicated in boldface, when executed on the server, create HTML that is sent to the client. This is a quick introduction. Don't worry if you don't understand exactly what is going on in this example; the details will be explained in Chapter 2.
Example 1.1. Sample.ASP, an Example of Processing Server-Side Script
<%@ LANGUAGE="VBSCRIPT" %><HTML> <HEAD> <TITLE>Sample ASP</TITLE> </HEAD> <BODY> Good afternoon.<BR> Welcome to the sample. It is now approximately<%=Time( )%>at the server. Here are a couple of demonstrations:<BR><BR><BR> Some simple text formatting done using HTML:<BR> <FONT SIZE = 1>Hello Size 1</FONT><BR> <FONT SIZE = 2>Hello Size 2</FONT><BR> <FONT SIZE = 3>Hello Size 3</FONT><BR> <FONT SIZE = 4>Hello Size 4</FONT><BR> <FONT SIZE = 5>Hello Size 5</FONT><BR> <BR> The same text formatting using server-side code:<BR> <% For intCounter = 1 to 5 %> <FONT SIZE =<%=intCounter%>> Hello Size<%=intCounter%></FONT><BR> <% Next %> <BR> </BODY> </HTML>
When the client receives the HTML result from the ASP script's execution, it resembles Figure 1.3.

Figure 1.3. Client-side view of Sample.ASP
If you were to view the HTML source behind this HTML, you would ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access