Presentation is loading. Please wait.

Presentation is loading. Please wait.

Computer Science Department

Similar presentations


Presentation on theme: "Computer Science Department"— Presentation transcript:

1 Computer Science Department
Active Server Pages (ASP) Dr. Awad Khalil Computer Science Department AUC

2 Active Server Pages (ASP)
Outline 1. Introduction 2. How Active Server Pages Work 3. Setup 4. Active Server Page Objects 5. Simple ASP Examples 6. File System Objects 7. Session Tracking and Cookies

3 Introduction

4 Introduction

5 Server-side technologies
Introduction Server-side technologies Dynamically creates Web pages Uses client information, server information and information from the Internet Active Server Pages (ASP) Microsoft Server-side technology Dynamically builds documents in response to client requests Delivers dynamic Web content XHTML, DHTML, ActiveX controls, client-side scripts and Java applets

6 Introduction

7 How Active Server Pages Work
Processed by scripting engine Server-side ActiveX control .asp file extension Can contain XHTML tags Scripting written with VBScript JavaScript also used Others (Independent Software Vendors) Communication with Server Client HTTP request to server Active server page processes request and returns results ASP document is loaded into memory asp.dll scripting engine on server Parses (top to bottom)

8 Setup Web Server Need to run Web server to use Active Server Pages
IIS (Internet Information Services) or PWS 4.0 (Personal Web Server 4.0) Create a virtual directory Copy files to c:\InetPub\Wwwroot or c:\Webshare\Wwwroot

9 Active Server Page Objects
Built-in objects Communicate with a Web browser Gather data sent by HTTP request Distinguish between users Request Get or post information Data provided by the user in an XHTML form Access to information stored on client machine Cookies File upload (binary) Response Sends inforamtion to client XHTML, text Server Access to server methods or properties

10 Active Server Page Objects

11 <%@LANGUAGE="JavaScript"%>
<html> <link rel="stylesheet" type="text/css" href="bighit.css"> <% // begin javascript code var id; id = 459 %> <title>Account ID: <%= id %></title> <center><table> <caption>Account ID: <%= id %></caption> <tr> <th>Account ID</th> <td><%= id %></td> </tr> </table></center> <p><a href="source.asp?file=simple.asp">Show source code</a> </html> Clock.asp sends Web server’s date and time to the client as XHTML markup <% %> scripting delimeter @LANGUAGE processing directive Option Explicit FormatDateTime Now vbLongDate format Response.write Time

12 Clock.asp sends Web server’s date and time to the client as XHTML markup <% %> scripting delimeter @LANGUAGE processing directive Option Explicit FormatDateTime Now vbLongDate format Response.write Time

13 Processing directive specifying scripting language
1 = VBScript %> 2 3 <% ' Fig. 2 : clock.asp ' A simple ASP example Option Explicit 7 %> 8 9 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 10 " 11 12 <html xmlns = " 13 <head> <title>A Simple ASP Example</title> <META HTTP-EQUIV = "REFRESH" CONTENT = "60; URL = CLOCK.ASP"> <style type = "text/css"> td { background-color: black; color: yellow } strong { font-family: arial, sans-serif; font-size: 14pt; color: blue } p { font-size: 14pt } </style> 24 </head> 26 <body> 28 <p><strong>A Simple ASP Example</strong></p> <table border = "6"> <tr> <td> <% =FormatDateTime( Now, vbLongDate ) %> </td> 35 Processing directive specifying scripting language Scripting delimeter wraps around code executed on the server. Clock.asp sends Web server’s date and time to the client as XHTML markup <% %> scripting delimeter @LANGUAGE processing directive Option Explicit FormatDateTime Now vbLongDate format Response.write Time Requires programmer explicitly define all variables Returns server date and time (Now) as a string formatted in vbLongDate format “<%=“ is short for Response.write

14 Clock.asp Time Program Output
<td> <% =Time() %> </td> </tr> </table> </body> 42 43 </html> Statement is short for: <% Call Response.write( Time()) %> Clock.asp Time Program Output

15 Fig. 25.3 XHTML generated by clock.asp.
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2 " 3 4 <html xmlns = " 5 <head> <title>A Simple ASP Example</title> 8 <style type = "text/css"> td { background-color: black; color: yellow } strong { font-family: arial, sans-serif; font-size: 14pt; color: blue } p { font-size: 14pt } </style> 16 </head> 18 <body> 20 <p><strong>A Simple ASP Example</strong></p> <table border = "6"> <tr> <td> Thursday, May 24, 2001 </td> 27 <td> :22:58 PM </td> </tr> </table> </body> 34 35 </html> Fig XHTML generated by clock.asp.

16 ASP Processing Concepts
ASP processes input Form information sent by client E-commerce Web site Use to verify customer information Server responds to process request Form Using post method action attribute indicates the .asp file to which the form information is posted request object retrieves form data

17 action set to ASP file where information is posted.
1 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 2 " 3 4 <!-- Fig. 4 : name.html > 5 <!-- XHTML document that request an ASP document --> 6 7 <html xmlns = " 8 <head> <title>Name Request</title> </head> 12 <body> 14 <p style = "font-family: arial, sans-serif"> Enter your name: </p> 18 <!-- request name.asp when posted --> <form action = "name.asp" method = "post"> <input type = "text" name = "namebox" size = "20" /> <input type = "submit" name = "submitButton" value = "Enter" /> </form> 25 </body> 27 28 </html> Name.html passes information into an ASP document using the post method. action set to ASP file where information is posted.

18 Name.html Program Output

19 Request object retrieves form data from textfield “namebox”
1 = VBScript %> 2 3 <% ' Fig. 5 : name.asp ' Another simple ASP example Option Explicit 7 %> 8 9 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 10 " 11 12 <html xmlns = " 13 <head> <title>Name Information</title> 16 <style type = "text/css"> p { font-family: arial, sans-serif; font-size: 14pt; color: navy } special { font-size: 20pt; color: green } </style> </head> 23 <body> 25 <!-- retrieve and display namebox's value --> <p>Hi <% =Request( "namebox" ) %>, </p><br /> <p class = "special">Welcome to ASP!</p> 29 </body> 31 32 </html> Name.asp Uses the Request method to retrieve the data posted in Name.html. Places this data within XHTML tags for output. Request object retrieves form data from textfield “namebox”

20 Name.asp Program Output

21 File System Objects (FSOs)
Allow programmer to manipulate files, directories and drives Read and write text Microsoft Scripting Runtime Library (Fig 6) FileSystemObject, File, Folder, Drive and TextStream Use to create directories, move files, determine whether a Drive exists FileSystemObject methods (Fig. 7) File object Allows programmer to gather info about files, manipulate files, open files File properties and methods (Fig. 8)

22 File System Objects

23 File System Objects

24 File System Objects

25 File System Objects – File Object

26 File System Objects (FSOs)
Path property Contains File path in long name format ShortName property Contains File path in short name format Folder object Allows programmer to manipulate and gather info about directories Folder properties (Fig. 9)

27 File System Objects – Folder Object

28 File System Objects – Folder Object

29 File System Objects – Folder Object
File System Objects (FSOs) IsRootFolder property Indicates whether folder is the root folder for the Drive If not: Method ParentFolder Retrieves parent folder Method Size Returns the total bytes the folder contains (includes subfolders)

30 File System Objects – Drive Object
File System Objects (FSOs) Drive object (Fig. 10) Gather information about drives Property DriveLetter Contains drive letter Property SerialNumber Contains drive serial number Property FreeSpace Contains number of available bytes

31 File System Objects – Drive Object

32 File System Objects – Textstream Object
File System Objects (FSOs) TextStream object (Fig. 11) Manipulate text files

33 File System Objects – Textstream Object

34 File System Objects – Textstream Object

35 File System Objects – Server Object

36 Set is required to establish a variable in VBScript
1 = VBScript %> 2 3 <% ' Fig. 12 : guestbook.asp ' Demonstrating File System Objects Option Explicit 6 %> 7 8 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 9 " 10 11 <html xmlns = " 12 <head> <title>GuestBook Example</title> 15 <style type = "text/css"> hr { size: 1; color: blue } table { text-align: center } td { font-size: 12pt } p { font-size: 14pt; color: blue } font { font-family: arial, sans-serif } </style> </head> <body> 25 <% Dim fileObject, textFile, guestBook, mailtoUrl 27 ' get physical path for this ASP page and ' concatenate guestbook.txt to it guestbook = Request.ServerVariables( "APPL_PHYSICAL_PATH" ) _ & "\guestbook.txt" 32 ' instantiate a FileSystemObject Set fileObject = Server.CreateObject( _ "Scripting.FileSystemObject" ) Guestbook.asp Users enter name, address and comments. FSOs write this data to a server file. Request ServerVariables APPL_PHYSICAL_PATH fileObject Set is required to establish a variable in VBScript Pass Request method ServerVariables server key APPL_PHYSICAL_PATH Concatenated with file name guestbook.txt Creating a FSO instance assigned to reference fileObject

37 Lines 41-60 execute when pages is loaded with post request.
36 ' Check if this request is after the user has posted the form If Request( "hiddenInput" ) = "true" Then 39 ' Print a thank you Call Response.Write( "Thanks for your entry, " & _ Request( "username" ) & "!" ) 43 %> <hr /> 45 <% ' build the mailtoUrl mailtoUrl = Date() & " <a href = " & Chr( 34 ) _ & "mailto:" & Request( " " ) & Chr( 34 ) _ & ">" & Request( "username" ) & "</a>: " 50 51 ' open the guestbook, 8 is for appending ' create the guestbook if it does not exist Set textFile = _ fileObject.OpenTextFile( guestbook, 8, True ) 56 ' write data to guestbook.txt Call textFile.WriteLine( "<hr />" & mailtoUrl & _ Request( "comment" ) ) Call textFile.Close() End If 62 %> 63 <p>Please leave a message in our guestbook.</p> 65 Request object retrieves hiddenInput value and tests it against string “true” Guestbook.asp Users enter name, address and comments. FSOs write this data to a server file. Request mailtoUrl Date() 34 “” WriteLine Close() Append Mode Lines execute when pages is loaded with post request. Prints string followed by users name input in the form Date() assigns current server date to beginning of mailtoUrl Sumbitted name and are combined and assigned to sring mailtoUrl Pass value 34 into VBScript Chr function to produce double quotes (“”) Displays a mailto: link. Request retrieves “ ” and “username” Contstant 8 indicates append mode (writing to the end of the file.) Method OpenTextFile retrieves TextStream object for accessing file guestbook.txt TextStream method WriteLine writes to guestbook.txt Close() method closes the file

38 Form post action to .asp page
<!-- write form to the client --> <form action = "guestbook.asp" method = "post"> <table> <tr> <td>Your Name: </td> <td><input class = "font" type = "text" size = "60" name = "username" /></td> </tr> 75 <tr> <td>Your address:</td> <td><input class = "font" type = "text" size = "60" name = " " value = /> </td> </tr> 84 <tr> <td>Tell the world: </td> <td><textarea name = "comment" rows = "3" cols = "50"> 89 Replace this text with the information 90 you would like to post.</textarea></td> </tr> </table> 93 <input type = "submit" value = "submit" /> <input type = "reset" value = "clear" /> <input type = "hidden" name = "hiddenInput" value = "true" /> </form> 99 Form post action to .asp page Guestbook.asp Users enter name, address and comments. FSOs write this data to a server file. <form> post action hiddenInput Form contains two text fields and text area for user input Passes parameter hiddenInput value “true”

39 Lines 100-115 execute every time the client requests this ASP page
100 <% ' check if the file exists If fileObject.FileExists( guestBook ) = True Then 103 104 ' open the guestbook, "1" is for reading Set textFile = fileObject.OpenTextFile( guestbook, 1 ) 107 ' read the entries from the file and write them to ' the client. Call Response.Write( "Guestbook Entries:<br />" & _ textFile.ReadAll() ) Call textFile.Close() 113 End If 115 %> 116 </body> 118 119 </html> Lines execute every time the client requests this ASP page FSO object FileExists checks if guestbook.txt exists. Guestbook.asp Users enter name, address and comments. FSOs write this data to a server file. FileExists() TextStream() ReadAll() Response.Write Response.Write writes text to client. Contains XHTML markup rendered on client browser. TextStream and ReadAll methods read entire contents of guestbook.txt Read entries from guestbook.txt and write XHTML to the client

40 Program Output

41 Program Output

42 XHTML generated by guestbook.asp
1 <hr />5/24/2001 <a href = ASP is a great tool for server-side development. 2 <hr />5/24/2001 <a href = ASP is my preferred server-side development tool. XHTML generated by guestbook.asp

43 Session Tracking and Cookies
Helps server to distinguish between clients Provide custom content Shopping cart Marketing/advertising SessionID Assigned by server to each unique session Compared with sessionIDs stored in server Session object Timeout property Length of session before it expires Abandon property Terminates individual session

44 Session Tracking and Cookies (Cont’d)
Many Web sites today provide custom Web pages and/or functionality on a client-by-client basis. The HTTP protocol does not support persistent information that could help a Web server determine that a request is from a particular client. As far as a Web server is concerned, every request could be from the same client or every request could be from a different client. Session tracking is handled by the server. The first time a client connects to the server, it is assigned a unique session ID by the server. When the client makes additional requests, the client’s session ID is compared against the session Ids stored in the server’s memory. ASPs use the Session object to manage sessions. The Session object’s Timeout property specifies the number of minutes a session exists for before it expires. The default value for property Timeout is 20 minutes. An individual session can also be terminated by calling Session method Abandon. Cookies can store information on the client’s computer for retrieval later in the same browsing session or in future browsing sessions. Cookies are files that are sent by an ASP as part of a response to a client. Every HTTP-based interaction between a client and a server includes a header that contains information about the request or information about the response. When an ASP receives a request, the header includes information such as the request type and cookies stored on the client machine by the server. When the server formulates its response, the header information includes any cookies the server wants to store on the client computer.

45 Session Tracking and Cookies (Cont’d)
Some clients do not allow cookies to be written on those clients. When a client declines a cookie the client is normally informed that such a refusal may prevent browsing the site. Depending on the maximum age of a cookie, the Web browser either maintains the cookie for the duration of the browsing session (i.e., until the user closes the Web browser) or stores the cookies on the client computer for future use. When the browser makes a request of a server, cookies previously sent to the client by that server are returned to the server (if they have not expired) as part of the request formulated by the browser. Cookies are automatically deleted when they expire. The following example uses session tracking. It consists of two ASPs linked to each other through HTTP POST requests. Multiple ASPs connected in this manner are sometimes called an ASP application. A user who is not familiar with HTML/ASP can input his/her information into a form, submit the form and the ASP application does all the work of generating an ASP page. We use session tracking in this example to maintain a state between the two ASP pages.

46 Session Tracking and Cookies (Cont’d)
ASP application Multiple ASP pages linked with session variables Example instantpage.asp Form, requests information from the user Posted to process.asp process.asp Redirects user to instantpage.asp if errors exist Otherwise creates users ASP page Stores message in session variable welcomeBack Every time user submits the form

47 Session Tracking and Cookies
Server-side include Commands embedded in XHTML documents Add dynamic content Places a .shtml include file within another file Physical or virtual path <!--#include file = “includes\file.shtml” --> Not all Web servers support Written as comment Performed before scripting code is interpreted. ASP page cannot determine which includes to use Can contain scripting code Must use <script> tag or <% %> delimeters

48 1 <% @LANGUAGE = VBScript %>
2 3 <% ' Fig. 15 : instantpage.asp ' ASP document that posts data to process.asp Option Explicit 7 %> 8 9 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 10 " 11 12 <html xmlns = " 13 <head> <title>Instant Page Content Builder</title> 16 <style type = "text/css"> table { text-align: center; font-size: 12pt; color: blue; font-size: 12pt; font-family: arial, sans-serif } </style> 24 </head> 26 <body> 28 <!-- include the header > <!-- #include virtual = "/includes/header.shtml" --> <h2>Instant Page Content Builder</h2> 32 Instantpage.asp Recieves error message from process.asp Uses server side include to create dynamic content (embedded file) Server-side include

49 Session object retrieves variable value
33 <% ' if process.asp posted an error, print the error ' message. If Session( "errormessage" ) <> "no error" Then Call Response.Write( Session( "errorMessage" ) ) ' otherwise, print the welcome back message, if any Else Call Response.Write( Session( "welcomeBack" ) ) End If 41 42 %> <!-- a form to get the information from the user --> <form action = "process.asp" method = "post"> <table> <tr> <td>Your Name: </td> 48 <td><input type = "text" size = "60" name = "username" /></td> </tr> 52 <tr> <td>Enter the Filename:</td> 55 <td><input type = "text" size = "60" name = "filename" value = "yourfilename" /></td> </tr> 60 <tr> <td>Enter the Title:</td> 63 <td><input type = "text" size = "60" name = "doctitle" value = "document title" /></td> </tr> If statement tests errorMessage equality to “no error”. Return True or False. Session object retrieves variable value errorMessage never has a value unless errors are encountered First time page is executed, line 35 returns true Instantpage.asp session variable with no explicit value contains an empty string When line 36 is executed and errorMessage has no value, line 36 does not print anything to the client. If true, errorMessage value is written to client errorMessage session variable used for error messages Else, WelcomeBack value is written to the client welcomeBack session variable displays “welcome back” message to returning users Requests process.asp when form is posted

50 Instantpage.asp Server-side include 68 69 <tr>
<td>Enter the content:</td> 71 <td><textarea name = "content" rows = "3" cols = "50"> 74 Replace this text with the 75 information you would like to post.</textarea></td> </tr> </table> 78 <input type = "submit" value = "submit" /> <input type = "reset" value = "clear" /> </form> 82 <!-- #include virtual = "/includes/footer.shtml" --> </body> 85 </html> Instantpage.asp Server-side include

51 Program Output

52 Program Output

53 Header.shtml server-side include file for the document header
1 <!-- Fig. 16: header.shtml > 2 <!-- Server-side include file containing XHTML --> 3 <hr style = "color: blue" /> 4 <img height = "100" src = "/images/bug2bug.gif" alt = "Bug" /> 5 <hr style = "color: blue" /> Header.shtml server-side include file for the document header

54 Footer.shtml server-side include file for the document footer
1 <!-- Fig. 17: footer.shtml > 2 <!-- Server-side include file containing XHTML --> 3 <hr style = "color: blue" /> 4 <a style = "text-align: center" href = "mailto:orders">ordering information</a> - 6 <a style = "text-align: center" href = "mailto:editor">contact the editor</a><br /> 8 <hr style = "color: blue" /> Footer.shtml server-side include file for the document footer

55 If statement validates contents of text field.
1 = VBScript %> 2 3 <% ' Fig. 18 : process.asp ' ASP document that creates user's ASP document Option Explicit 7 %> 8 9 <% Dim message, q 11 q = Chr( 34 ) ' assign quote character to q Session( "errorMessage" ) = "no error" 14 ' check to make sure that they have entered a ' valid filename If ( LCase( Request( "filename" ) ) = "yourfilename" ) _ Or Request( "filename" ) = "" Then message = "<p style = " & q & "color: red" & q & _ ">" & "Please enter a valid name or filename.</p>" Session( "errorMessage" ) = message Call Server.Transfer( "instantpage.asp" ) End If 24 Dim directoryPath, filePath, fileObject, fileName 26 ' Create a FileSystem Object Set fileObject = Server.CreateObject( _ "Scripting.FileSystemObject" ) 30 directoryPath = _ Request.ServerVariables( "APPL_PHYSICAL_PATH" ) 33 fileName = Request( "filename" ) & ".asp" 35 Process.asp Creates the user’s ASP document and presents a link to the user’s page Requested by instantpage.asp If field is empty or contains default string yourfilename, lines assign XHTML error message to variable message. If statement validates contents of text field. Assign message value to session variable errorMessage FSO object is created if valid user name is entered and assigned reference fileObject Request.ServerVariables retrieves physical path Server method Transfer requests instantpage.asp Specify server path where ASP file is written Builds fileName by concatenating “filename” to the .asp file extension

56 filePath passed FileExists method. Determines if file exists.
' build path for text file filePath = directoryPath & "\" & fileName 38 ' check if the file already exists If fileObject.FileExists( filePath ) Then message = "<p style = " & q & "color: red" & q & _ ">" & "The file name is in use.<br />" & _ "Please use a different file name.</p>" Session( "errorMessage" ) = message Call Server.Transfer( "instantpage.asp" ) End If 47 ' save XHTML for the welcome back message ' in a session variable message = "<p style = " & q & "color: blue" & q & _ ">" & "Welcome Back, " & Request( "username" ) & _ "</p><br />" Session( "welcomeBack" ) = message 54 Dim header, footer, textFile, openMark, closeMark openMark = "<" & "%" closeMark = "%" & ">" 58 ' build the header. ' vbCrLf inserts a carriage return/linefeed into the text ' string which makes the XHTML code more readable header = openMark & = VBScript " & closeMark _ & vbCrLf & openMark & " ' " & fileName _ & " " & closeMark & vbCrLf & vbCrLf _ & "<!DOC" & "TYPE html PUBLIC " & q & _ "-//W3C//DTD XHTML 1.0 Transitional//EN" & q & _ vbCrLf & q & " & _ "DTD/xhtml1-transitional.dtd" & q & ">" & vbCrLf & _ "<html xmlns = " & q & " & _ q & ">" & vbCrLf & "<head>" & vbCrLf _ Builds file path by concatenating file name to directory path. Assigned to variable filePath. Process.asp Creates the user’s ASP document and presents a link to the user’s page Requested by instantpage.asp filePath passed FileExists method. Determines if file exists. If file exists, variable errorMessage value is set to XHTML containing error message Server Transfer method requests instantpage.asp Assigns XHTML for “welcome back” message to welcomeBack session variable Construct XHTML for header Assign ASP scripting delimeters to string variables openMark and closeMark

57 Form values retrieved using Request object
& "<meta name = " & q & "author" & q & " content = " _ & q & Request( "username" ) & q & " />" & vbCrLf _ & "<meta name = " & q & "pubdate" & q & " content = " _ & q & Date() & q & " />" & vbCrLf _ & "<title>" & Request( "doctitle" ) & "</title>" _ & vbCrLf & "</head>" & vbCrLf & "<body>" & vbCrLf _ & "<!-- #" & "include " & "virtual = " & _ "/includes/header.shtml -->" _ & vbCrLf & "<h2 style = " & q & "text-align: center" & _ q & "><em>" & Request( "doctitle" ) & "</em></h2>" & _ vbCrLf & "<br />" & vbCrLf 82 ' build the footer using a different style for ' building the string footer = vbCrLf & "<br /><br /><br />" & vbCrLf & _ "You have requested this page on " & _ openMark & " =Date() " & closeMark & "," & _ vbCrLf & "at " & openMark & " =Time() " & _ closeMark & "." & vbCrLf & _ "<!-- #" & "include " & "virtual = " & _ "/includes/footer.shtml -->" _ & vbCrLf & vbCrLf & "</body>" & vbCrLf & "</html>" 93 ' create the ASP file Set textFile = fileObject.CreateTextFile( filePath, False ) With textFile Call .WriteLine( header & Request( "content" ) & _ footer ) Call .Close() End With 101 %> 102 103 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 104 " 105 Form values retrieved using Request object Process.asp Creates the user’s ASP document and presents a link to the user’s page Requested by instantpage.asp footer variable assigned to XHTML footer contents Write header, text area content’s text and footer to text file Lines send XHTML to client that contains link to created page

58 Lines 103-129 send XHTML to client that contains link to created page
106 <html xmlns = " 107 <head> <!-- use the title given by the user --> <title>File Generated: <% =fileName %></title> 111 <style type = "text/css"> h2 { font-family: arial, sans-serif; text-align: center } </style> 116 </head> 118 <body> <!-- #include virtual = "/includes/header.shtml" --> <h2><em>File <% =fileName %> was created successfully.</em> </h2><br /> 124 <!-- provide a link to the generated page --> <a href = "<% =fileName %>">View your file</a> <!-- #include virtual = "/includes/footer.shtml" --> </body> 129 </html> Process.asp Creates the user’s ASP document and presents a link to the user’s page Requested by instantpage.asp Lines send XHTML to client that contains link to created page

59 Test.asp XHTML file created by process.asp
1 = VBScript %> 2 <% ' test.asp %> 3 4 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 5 " 6 <html xmlns = " 7 <head> 8 <meta name = "author" content = "tem" /> 9 <meta name = "pubdate" content = "2/27/2001" /> 10 <title>XML How to Program</title> 11 </head> 12 <body> 13 <!-- Fig : header.shtml > 14 <!-- Server-side include file containing XHTML --> 15 <hr style = "color: blue" /> 16 <img height = "100" src = "/images/bug2bug.gif" alt = "Bug" /> 17 <hr style = "color: blue" /> 18 <h2 style = "text-align: center"><em>XML How to Program</em></h2> 19 <br /> 20 21 The authoritative Deitel™ Live-Code™ 22 introduction to XML-based systems development. 23 ISBN 24 25 <br /><br /><br /> 26 You have requested this page on 2/27/2001, 27 at 10:14:44 PM. 28 <!-- Fig : footer.shtml > 29 <!-- Server-side include file containing XHTML --> 30 <hr style = "color: blue" /> 31 <a style = "text-align: center" href = "mailto:orders">ordering information</a> - Test.asp XHTML file created by process.asp

60 Test.asp XHTML file created by process.asp Program Output
33 <a style = "text-align: center" href = "mailto:editor">contact the editor</a><br /> 35 <hr style = "color: blue" /> 36 37 </body> 38 </html> Test.asp XHTML file created by process.asp Program Output Fig. 20 Welcome back message displayed by instantpage.asp.

61 Session Tracking and Cookies
Fig. 21 Error message generated by instantpage.asp.


Download ppt "Computer Science Department"

Similar presentations


Ads by Google