1060 lines
46 KiB
HTML
1060 lines
46 KiB
HTML
<!DOCtype HTML PUBLIC "-//W3C//Dtd HTML 3.2//EN">
|
|
<html dir=ltr><head><title>Module 3: Maintaining Session State in a Web Application</title>
|
|
|
|
<SCRIPT LANGUAGE="JavaScript">
|
|
<!--
|
|
TempString = navigator.appVersion
|
|
if (navigator.appName == "Microsoft Internet Explorer"){
|
|
// Check to see if browser is Microsoft
|
|
if (TempString.indexOf ("4.") >= 0){
|
|
// Check to see if it is IE 4
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
|
|
}
|
|
else {
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
|
|
}
|
|
}
|
|
else if (navigator.appName == "Netscape") {
|
|
// Check to see if browser is Netscape
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/coua.css">');
|
|
}
|
|
else
|
|
document.writeln('<link rel="stylesheet" type="text/css" href="/iishelp/common/cocss.css">');
|
|
//-->
|
|
</script>
|
|
|
|
|
|
<SCRIPT LANGUAGE="VBScript">
|
|
<!--
|
|
Sub Window_OnLoad()
|
|
Dim frmContents
|
|
On Error Resume Next
|
|
If Not Parent Is Nothing Then
|
|
Set frmContents = Parent.Contents
|
|
If Not frmContents Is Nothing Then
|
|
frmContents.Window.TOCSynch_Click
|
|
End If
|
|
End If
|
|
End Sub
|
|
//-->
|
|
</SCRIPT>
|
|
|
|
<META NAME="ROBOTS" CONTENT="NOINDEX"><META HTTP-EQUIV="Content-Type" content="text/html; charset=Windows-1252"></head>
|
|
|
|
<body bgcolor="#FFFFFF" text="#000000"><font face="Verdana,Arial,Helvetica">
|
|
|
|
<h1><a name="maintainingsessionstate">Module 3: Maintaining Session State</a></h1>
|
|
|
|
<p>
|
|
This module describes the process of maintaining session state in Active
|
|
Server Pages (ASP). Session refers to the time segment that
|
|
a specific user is actively viewing the contents of a Web site. A session
|
|
starts when the user visits the first page on the site, and it ends a few minutes
|
|
after the user leaves the site. The pieces of user-specific information, relevant
|
|
to a particular session, are collectively known as <i>session state</i>.
|
|
</p>
|
|
|
|
<p>Because HTTP is a stateless protocol, a problem arises when trying to
|
|
maintain state for a user visiting your Web site. The Web server treats each
|
|
HTTP request as a unique request, which is unrelated to any previous requests.
|
|
Thus, the information a user enters on one page (through a form, for example)
|
|
is not automatically available on the next page requested. The Web server must
|
|
maintain session state to identify and track users as they browse through pages
|
|
on a Web site.
|
|
</p>
|
|
|
|
<p>One solution is through the use of <i>cookies</i>. Cookies record information
|
|
about a user on one page and transfer that information to other pages within
|
|
the site. However, a few browsers do not recognize cookies, and on other browsers,
|
|
users can disable cookies. If you are concerned about reaching this Web audience,
|
|
you can maintain session state without using cookies by using HTTP POST.
|
|
</p>
|
|
|
|
<p>
|
|
This module includes the following lessons:
|
|
</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<a href="#with">Maintaining Session State with Cookies</a> Provides two
|
|
cookie examples, one using the ASP Response and Request objects and another
|
|
using the ASP Session object.
|
|
</li><li>
|
|
<a href="#without">Maintaining Session State Without Cookies</a> Provides
|
|
an example of the alternative to maintaining session state with cookies: HTTP POST.
|
|
</li>
|
|
</ul>
|
|
|
|
<BR><h2><a name="with">Maintaining Session State with Cookies</a></h2>
|
|
|
|
<p>
|
|
Cookies store a set of user specific information, such as a credit card number
|
|
or a password. The Web server embeds the cookie into a user's Web browser so that the user's information becomes available to other pages within the site; users do
|
|
not have to reenter their information for every page they visit. Cookies are a
|
|
good way to gather customer information for Web-based shopping, for retaining the
|
|
personal preferences of the Web user, or for maintaining state about the user.
|
|
</p>
|
|
|
|
<p>
|
|
There are two kinds of cookies, as follows:
|
|
</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<B>In-memory cookies</b> An in-memory cookie goes away when the user shuts the browser down.
|
|
</li><li>
|
|
<B>Persistent cookies</b> A persistent cookie resides on the hard drive of the user and is retrieved when the user comes back to the Web page.
|
|
</li>
|
|
</ul>
|
|
|
|
<p>
|
|
If you create a cookie without specifying an expiration date, you are creating
|
|
an in-memory cookie, which lives for that browser session only. The following
|
|
illustrates the script that would be used for an in-memory cookie:
|
|
</p>
|
|
|
|
<code>
|
|
<p>
|
|
Response.Cookies("SiteArea") = "TechNet"
|
|
</p>
|
|
</code>
|
|
|
|
<p>
|
|
If you want the cookie information to persist beyond the session, you should
|
|
create a persistent cookie by specifying an expiration date. Supplying an
|
|
expiration date causes the browser to save the cookie on the client computer.
|
|
Until the cookie expiration date is reached, the data in the persistent cookie
|
|
will stay on the client machine. Any request to the original Web site will
|
|
automatically attach the cookie that was created by that site. Cookies go only to the sites that created them because part of the Web site name and ASP file
|
|
make up the data in the cookie.
|
|
<BR>The following illustrates the script used to create a persistent cookie:
|
|
</p>
|
|
|
|
<code>
|
|
<p>
|
|
Response.Cookies("SiteArea") = "TechNet"
|
|
<br> Response.Cookies("SiteArea").Expires = "August 15, 2000"
|
|
</p>
|
|
</code>
|
|
|
|
<p>The script to create a cookie should be placed at the beginning of the ASP
|
|
file because cookies need to be generated before any HTML text is sent to the
|
|
browser.
|
|
</p>
|
|
|
|
<BR><h3>Cookies Using the Response and Request Objects</h3>
|
|
|
|
<p>
|
|
Persistent cookies are produced using the <b>Response</b> and <b>Request</b> objects,
|
|
although these objects may also be used to create an in-memory cookie. The
|
|
majority of Web applications employ these objects to maintain session state.
|
|
</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<B>Response object</B> Use the <b>Response</b> object to create and set cookie values.
|
|
</li><li>
|
|
<B>Request object</B> Use the <b>Req</b>uest object to retrieve the value of a cookie
|
|
created during a previous Web session.
|
|
</li>
|
|
</ul>
|
|
|
|
<p>
|
|
In this lesson you will use the <b>Response</b> and <b>Request</b> objects to create the following
|
|
files. Please create them all at once, because some of them need the others. After you
|
|
have created all the files, run the application by typing
|
|
<b>http://LocalHost/Tutorial/Frame.htm</b> in your browser.
|
|
</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<B>Frame.htm</B> A page that splits the the user's view into two windows. This
|
|
page requires that Menu.htm and CustomGreeting.asp.
|
|
</li><li>
|
|
<B>Menu.htm</B> A page containing links to the samples for this lesson. For the links to work, this
|
|
page requires that all the other pages have been created.
|
|
</li><li>
|
|
<B>CustomGreeting.asp</B> An ASP script that takes the user's name in a form
|
|
and sets an in-memory cookie.
|
|
</li><li>
|
|
<B>DeleteGreetingCookie.asp</B> An ASP script that deletes the cookie that
|
|
contains the user's name. If no cookie is set, a warning is displayed.
|
|
</li><li>
|
|
<B>SelectColors.asp</B> An ASP script that sets up the cookies for the user's
|
|
color choices.
|
|
</li><li>
|
|
<B>DeleteColorCookie.asp</B> An ASP script that deletes the Web colors previously
|
|
chosen. If none are chosen, a warning is displayed.
|
|
</li><li>
|
|
<B>Cookie.asp</B> An ASP script that sets persistent cookies to hold the current
|
|
date and time of the user's visit and record the total number of visits.
|
|
</li><li>
|
|
<B>DeleteCookies.asp</B> This ASP script deletes the cookies set in Cookie.asp. If no
|
|
cookies are set, a warning is displayed.
|
|
</li></ul>
|
|
|
|
<BR><h4>Frame.htm</h4>
|
|
|
|
<p>
|
|
Open a new file in your text editor, paste in the following script, and save
|
|
the file as <b>C:\Inetpub\Wwwroot\Tutorial\Frame.htm</b>.
|
|
</p>
|
|
|
|
<code>
|
|
<p>
|
|
<html>
|
|
<BR> <head>
|
|
<BR> <title>Customized Greeting and Colors Using In-Memory and Persistent Cookies</title>
|
|
<BR> </head>
|
|
<BR>
|
|
<BR> <frameset cols="40%,60%">
|
|
<BR> <frame src="menu.htm" name="left" marginheight="5" marginwidth="5">
|
|
<BR> <frame src="CustomGreeting.asp" name="right" marginheight="5" marginwidth="5">
|
|
<BR> </frameset>
|
|
<BR>
|
|
<BR> <noframes>
|
|
<BR> Sorry, your browser does not support frames. Please go to the <a href="menu.htm">Menu</a>.
|
|
<BR> </noframes>
|
|
<BR>
|
|
<BR> </html>
|
|
</p>
|
|
</code>
|
|
|
|
<BR><h4>Menu.htm</h4>
|
|
|
|
<p>
|
|
Open a new file in your text editor, paste in the following script, and save
|
|
the file as <b>C:\Inetpub\Wwwroot\Tutorial\Menu.htm</b>.
|
|
</p>
|
|
|
|
<code>
|
|
<p>
|
|
<html>
|
|
<BR> <head>
|
|
<BR> <title>Maintaining Session State With Cookies</title>
|
|
<BR> </head>
|
|
<BR> <body>
|
|
<BR> <font face="MS Gothic">
|
|
<BR>
|
|
<BR> <h2 align="center">Cookie Examples</h2>
|
|
<BR>
|
|
<BR> <table align=center border=1 cellpadding=4>
|
|
<BR> <tr>
|
|
<BR> <td><a href="CustomGreeting.asp" target="right"><b>Custom Greeting Page</b></a></td>
|
|
<BR> </tr><tr>
|
|
<BR> <td><a href="DeleteGreetingCookie.asp" target="right"><b>Delete the Greetings Cookie</b></a></td>
|
|
<BR> </tr><tr>
|
|
<BR> <td><a href="SelectColors.asp" target="right"><b>Set Page Colors</b></a></td>
|
|
<BR> </tr><tr>
|
|
<BR> <td><a href="DeleteColorCookie.asp" target="right"><b>Delete Page Colors Cookies</b></a></td>
|
|
<BR> </tr><tr>
|
|
<BR> <td><a href="Cookie.asp" target="right"><b>Set Cookies for Date, Time and Total Visits</b></a></td>
|
|
<BR> </tr><tr>
|
|
<BR> <td><a href="DeleteCookies.asp" target="right"><b>Delete Cookies for Date, Time and Total Visits</b></a></td>
|
|
<BR> </tr>
|
|
<BR> </table>
|
|
<BR>
|
|
<BR> </font>
|
|
<BR> </body>
|
|
<BR> </html>
|
|
</p>
|
|
</code>
|
|
|
|
<BR><h4>CustomGreeting.asp</h4>
|
|
|
|
<p>
|
|
Open a new file in your text editor, paste in the following script, and save
|
|
the file as <b>C:\Inetpub\Wwwroot\Tutorial\CustomGreeting.asp</b>.
|
|
</p>
|
|
|
|
<code>
|
|
<p>
|
|
<%@ Language="VBScript" %>
|
|
<BR> <%
|
|
<BR> 'If the user has selected text and background colors,
|
|
<BR> ' cookies are used to remember the values between HTTP sessions.
|
|
<BR> 'Do this first so that your page can use use the values if they are set.
|
|
<BR> If Not (Request.QueryString("Text")="") Then
|
|
<BR> Response.Cookies("TextColor") = Request.QueryString("Text")
|
|
<BR> Response.Cookies("BackgroundColor") = Request.QueryString("Background")
|
|
<BR> End If
|
|
<BR>
|
|
<BR> ' If the user has typed in a name, a cookie is created.
|
|
<BR> If Not (Request.QueryString("Name")="") Then
|
|
<BR> Response.Cookies ("Name") = Request.QueryString("Name")
|
|
<BR>
|
|
<BR> ' If the user does not give his/her name, a cookie
|
|
<BR> ' is created so that we do not keep asking for the name.
|
|
<BR> ElseIf (InStr(Request.QueryString,"Name")=1) Then
|
|
<BR> Response.Cookies ("NoUserInput") = "TRUE"
|
|
<BR>
|
|
<BR> End If
|
|
<BR> %>
|
|
<BR>
|
|
<BR> <html>
|
|
<BR> <head>
|
|
<BR> </head>
|
|
<BR>
|
|
<BR> <%
|
|
<BR> 'Set colors according to existing previous user input.
|
|
<BR> If (Request.Cookies ("TextColor")="") Then %>
|
|
<BR> <body>
|
|
<BR> <% Else %>
|
|
<BR> <body bgcolor=<%=Request.Cookies("BackgroundColor")%> text=<%=Request.Cookies("TextColor")%>>
|
|
<BR> <% End If
|
|
<BR> %>
|
|
<BR>
|
|
<BR> <font face="MS Gothic">
|
|
<BR>
|
|
<BR> <%
|
|
<BR> 'If there is no name cookie set, no name entered by the user,
|
|
<BR> ' and there was no user input at all, get the user's name.
|
|
<BR> If ( (Request.Cookies("Name")="") And ((Request.QueryString("Name"))="")) And (Not(Request.Cookies("NoUserInput")="TRUE") ) Then %>
|
|
<BR>
|
|
<BR> <FORM ACTION="CustomGreeting.asp" METHOD="GET" NAME="DataForm">
|
|
<BR> <table align=center><tr><td>
|
|
<BR> <INPUT TYPE=TEXTBOX NAME="Name" SIZE=33></td></tr><tr><td>
|
|
<BR> <INPUT TYPE=Submit VALUE="Please Enter Your Name"></td></tr></table>
|
|
<BR> </FORM>
|
|
<BR>
|
|
<BR> <% ElseIf Not(Request.Cookies("Name")="") Then %>
|
|
<BR>
|
|
<BR> <H2 align=center>Greetings <%=Request.Cookies("Name")%></H2>
|
|
<BR>
|
|
<BR> <% Else %>
|
|
<BR>
|
|
<BR> <H2>Hello!</H2>
|
|
<BR> <H3>You did not give us your name so we are not able to greet you by name.</H3>
|
|
<BR>
|
|
<BR> <% End If
|
|
<BR> %>
|
|
<BR>
|
|
<BR> <H3>In-Memory Cookie Example</H3>
|
|
<BR> <P>
|
|
<BR> Once you enter your name:
|
|
<BR> <UL>
|
|
<BR> <LI>If you hit <B>Refresh</B> in your browser, you should still see your name.</LI>
|
|
<BR> <LI>If you close your browser, the cookie is deleted. When you re-open your browser to this page, you should be asked for your name again.</LI>
|
|
<BR> <LI>If you click on <B>Delete the Greetings Cookie</B>, and click on <B>Custom Greeting Page</B>, you should be asked for your name again.</LI>
|
|
<BR> </P>
|
|
<BR>
|
|
<BR> </font>
|
|
<BR> </body>
|
|
<BR> </html>
|
|
</p>
|
|
</code>
|
|
|
|
<BR><h4>DeleteGreetingCookie.asp</h4>
|
|
|
|
<p>
|
|
Open a new file in your text editor, paste in the following script, and save
|
|
the file as <B>C:\Inetpub\Wwwroot\Tutorial\DeleteGreetingCookie.asp</b>.
|
|
</p>
|
|
|
|
<code>
|
|
<p>
|
|
<%@ Language="VBScript" %>
|
|
<BR>
|
|
<BR> <html>
|
|
<BR> <head>
|
|
<BR> </head>
|
|
<BR>
|
|
<BR> <% If (Request.Cookies ("TextColor")="") Then %>
|
|
<BR> <body>
|
|
<BR> <font face="MS Gothic">
|
|
<BR> <% Else %>
|
|
<BR> <body bgcolor=<%=Request.Cookies("BackgroundColor")%> text=<%=Request.Cookies("TextColor")%>>
|
|
<BR> <font face="MS Gothic" color=<%=Request.Cookies("TextColor")%>>
|
|
<BR> <% End If %>
|
|
<BR>
|
|
<BR> <%
|
|
<BR> If Not ("" = Request.Cookies("Name")) Then
|
|
<BR> Response.Cookies ("Name").Expires = "January 1, 1992"
|
|
<BR> Response.Cookies ("NoUserInput").Expires = "January 1, 1992" %>
|
|
<BR>
|
|
<BR> <h2 align=center>In-Memory Greeting Cookie Deleted</h2>
|
|
<BR> <P>
|
|
<BR> The cookie used to keep track of your name has been deleted.<BR>
|
|
<BR> Please click on <B>Custom Greeting Page</B> to be asked for your name again.
|
|
<BR> </P>
|
|
<BR>
|
|
<BR> <% Else %>
|
|
<BR>
|
|
<BR> <h2 align=center>No In-Memory Greeting Cookie Deleted</h2>
|
|
<BR> <P>
|
|
<BR> There was no cookie set with your name.<BR>
|
|
<BR> Please click on <B>Custom Greeting Page</B> to enter your name.
|
|
<BR> </P>
|
|
<BR>
|
|
<BR> <% End If
|
|
<BR> %>
|
|
<BR>
|
|
<BR> </font>
|
|
<BR> </body>
|
|
<BR> </html>
|
|
</p>
|
|
</code>
|
|
|
|
<br><h4>SelectColors.asp</h4>
|
|
|
|
<p>
|
|
Open a new file in your text editor, paste in the following script, and save
|
|
the file as <B>C:\Inetpub\Wwwroot\Tutorial\SelectColors.asp</b>.
|
|
</p>
|
|
|
|
<code>
|
|
<p>
|
|
<%@ Language="VBScript" %>
|
|
<BR>
|
|
<BR> <%
|
|
<BR> ' If the user has selected text and background colors,
|
|
<BR> ' cookies are used to remember the values between HTTP sessions.
|
|
<BR> If Not (Request.QueryString("Text")="") Then
|
|
<BR> Response.Cookies ("TextColor") = Request.QueryString("Text")
|
|
<BR> Response.Cookies ("BackgroundColor") = Request.QueryString("Background")
|
|
<BR> End If
|
|
<BR> %>
|
|
<BR>
|
|
<BR> <html>
|
|
<BR> <head>
|
|
<BR> </head>
|
|
<BR>
|
|
<BR> <%
|
|
<BR> 'Set colors according to existing previous user input.
|
|
<BR> If (Request.Cookies ("TextColor")="") Then %>
|
|
<BR> <body>
|
|
<BR> <% Else %>
|
|
<BR> <body bgcolor=<%=Request.Cookies("BackgroundColor")%> text=<%=Request.Cookies("TextColor")%>>
|
|
<BR> <% End If
|
|
<BR> %>
|
|
<BR>
|
|
<BR> <font face="MS Gothic">
|
|
<BR>
|
|
<BR> <H2 align=center>Select the colors for your Web page</H2>
|
|
<BR> <P>
|
|
<BR> In Memory Cookies will be used to store these values.
|
|
<BR> </P>
|
|
<BR> <FORM ACTION="SelectColors.asp" METHOD="GET" NAME="DataForm">
|
|
<BR> <table border="1" width="450" cellpadding=0>
|
|
<BR> <tr><td>
|
|
<BR> <table>
|
|
<BR> <tr><td BGCOLOR=99FF99>
|
|
<BR> <B><font color=000000>Please select the background color</font></B>
|
|
<BR> </td></tr><tr><td BGCOLOR=FFFFFF>
|
|
<BR> <input type="RADIO" NAME="Background" VALUE="FFFFFF" CHECKED><font COLOR=000000> FFFFFF </font>
|
|
<BR> </td></tr><tr><td BGCOLOR=D98719>
|
|
<BR> <input type="RADIO" NAME="Background" VALUE="D98719"> D98719
|
|
<BR> </td></tr><tr><td BGCOLOR=D9D919>
|
|
<BR> <input type="RADIO" NAME="Background" VALUE="D9D919"> D9D919
|
|
<BR> </td></tr><tr><td BGCOLOR=00FFFF>
|
|
<BR> <input type="RADIO" NAME="Background" VALUE="00FFFF"> 00FFFF
|
|
<BR> </td></tr><tr><td BGCOLOR=FF00FF>
|
|
<BR> <input type="RADIO" NAME="Background" VALUE="FF00FF"> FF00FF
|
|
<BR> </td></tr><tr><td BGCOLOR=000000>
|
|
<BR> <input type="RADIO" NAME="Background" VALUE="000000"> <font COLOR=FFFFFF>000000</font>
|
|
<BR> </td></tr>
|
|
<BR> </table>
|
|
<BR> </td><td>
|
|
<BR> <table>
|
|
<BR> <tr><td BGCOLOR=99FF99>
|
|
<BR> <B><font color=000000>Please select the text color</font></B>
|
|
<BR> </td></tr><tr><td BGCOLOR=FFFFFF>
|
|
<BR> <input type="RADIO" NAME="Text" VALUE="FFFFFF" CHECKED><font COLOR=000000> FFFFFF </font>
|
|
<BR> </td></tr><tr><td BGCOLOR=D98719>
|
|
<BR> <input type="RADIO" NAME="Text" VALUE="D98719"> D98719
|
|
<BR> </td></tr><tr><td BGCOLOR=D9D919>
|
|
<BR> <input type="RADIO" NAME="Text" VALUE="D9D919"> D9D919
|
|
<BR> </td></tr><tr><td BGCOLOR=00FFFF>
|
|
<BR> <input type="RADIO" NAME="Text" VALUE="00FFFF"> 00FFFF
|
|
<BR> </td></tr><tr><td BGCOLOR=FF00FF>
|
|
<BR> <input type="RADIO" NAME="Text" VALUE="FF00FF"> FF00FF
|
|
<BR> </td></tr><tr><td BGCOLOR=000000>
|
|
<BR> <input type="RADIO" NAME="Text" VALUE="000000" CHECKED><font COLOR=FFFFFF> 000000 </font>
|
|
<BR> </td></tr>
|
|
<BR> </table>
|
|
<BR> </td></tr>
|
|
<BR> </table>
|
|
<BR> <P>
|
|
<BR> <input type=Submit VALUE="Submit selected colors">
|
|
<BR> </FORM>
|
|
<BR>
|
|
<BR> </font>
|
|
<BR> </body>
|
|
<BR> </html>
|
|
</p>
|
|
</code>
|
|
|
|
<br><h4>DeleteColorCookie.asp</h4>
|
|
|
|
<p>
|
|
Open a new file in your text editor, paste in the following script, and save
|
|
the file as <B>C:\Inetpub\Wwwroot\Tutorial\DeleteColorCookie.asp</b>.
|
|
</p>
|
|
|
|
<code>
|
|
<p>
|
|
<%@ Language="VBScript" %>
|
|
<BR>
|
|
<BR> <html>
|
|
<BR> <head>
|
|
<BR> </head>
|
|
<BR> <body>
|
|
<BR> <font face="MS Gothic">
|
|
<BR>
|
|
<BR> <%
|
|
<BR> If Not ("" = Request.Cookies("TextColor")) Then
|
|
<BR> Response.Cookies("TextColor").Expires = "January 1, 1992"
|
|
<BR> Response.Cookies("BackgroundColor").Expires = "January 1, 1992" %>
|
|
<BR>
|
|
<BR> <h2 align=center>In-Memory Color Cookie Deleted</h2>
|
|
<BR> <P>
|
|
<BR> The cookie used to keep track of your display colors has been deleted.<BR>
|
|
<BR> Please click on <B>Set Page Colors</B> to set your colors again.
|
|
<BR> </P>
|
|
<BR>
|
|
<BR> <% Else %>
|
|
<BR>
|
|
<BR> <h2 align=center>No In-Memory Color Cookie Deleted</h2>
|
|
<BR> <P>
|
|
<BR> There was no cookie set with your color choices.<BR>
|
|
<BR> Please click on <B>Set Page Colors</B> to set display colors.
|
|
<BR> </P>
|
|
<BR>
|
|
<BR> <% End If
|
|
<BR> %>
|
|
<BR>
|
|
<BR> </font>
|
|
<BR> </body>
|
|
<BR> </html>
|
|
</p>
|
|
</code>
|
|
|
|
<BR><h4>Cookie.asp</h4>
|
|
|
|
<p>
|
|
Open a new file in your text editor, paste in the following script, and save
|
|
the file as <B>C:\Inetpub\Wwwroot\Tutorial\Cookie.asp</b>.
|
|
</p>
|
|
|
|
<code>
|
|
<p>
|
|
<%@ Language="VBScript" %>
|
|
<BR>
|
|
<BR> <%
|
|
<BR> LastAccessTime = Request.Cookies("LastTime")
|
|
<BR> LastAccessDate = Request.Cookies("LastDate")
|
|
<BR>
|
|
<BR> 'If the NumVisits cookie is empty, set to 0, else increment it.
|
|
<BR> If (Request.Cookies("NumVisits")="") Then
|
|
<BR> Response.Cookies("NumVisits") = 0
|
|
<BR> Else
|
|
<BR> Response.Cookies("NumVisits") = Request.Cookies("NumVisits") + 1
|
|
<BR> End If
|
|
<BR>
|
|
<BR> Response.Cookies("LastDate") = Date
|
|
<BR> Response.Cookies("LastTime") = Time
|
|
<BR>
|
|
<BR> 'Setting an expired date past the present date creates a persistent cookie.
|
|
<BR> Response.Cookies("LastDate").Expires = "January 15, 2001"
|
|
<BR> Response.Cookies("LastTime").Expires = "January 15, 2001"
|
|
<BR> Response.Cookies("NumVisits").Expires = "January 15, 2001"
|
|
<BR> %>
|
|
<BR>
|
|
<BR> <html>
|
|
<BR> <head>
|
|
<BR> </head>
|
|
<BR> <% If (Request.Cookies ("TextColor")="") Then %>
|
|
<BR> <body>
|
|
<BR> <font face="MS Gothic">
|
|
<BR> <% Else %>
|
|
<BR> <body bgcolor=<%=Request.Cookies("BackgroundColor")%> text=<%=Request.Cookies("TextColor")%>>
|
|
<BR> <font face="MS Gothic" color=<%=Request.Cookies("TextColor")%>>
|
|
<BR> <% End If %>
|
|
<BR>
|
|
<BR> <H2 align=center>Persistent Client-Side Cookies!</H2>
|
|
<BR>
|
|
<BR> <P>
|
|
<BR> Three persistent client-side cookies are created.
|
|
<BR> <UL>
|
|
<BR> <LI>A cookie to count the number of times you visited the Web page.</LI>
|
|
<BR> <LI>A cookie to determine the date of your visit.</LI>
|
|
<BR> <LI>A cookie to determine the time of your visit.</LI>
|
|
<BR> </UL>
|
|
<BR> </P>
|
|
<BR>
|
|
<BR> <table border="1" width="300" cellpadding=4 align=center>
|
|
<BR> <tr><td>
|
|
<BR> <% If (Request.Cookies ("NumVisits")=0) Then %>
|
|
<BR> Welcome! This is your first visit to this Web page!
|
|
<BR> <% Else %>
|
|
<BR> Thank you for visiting again! You have been to this Web page a total of <B><%=Request.Cookies("NumVisits")%></B> time(s).
|
|
<BR> <% End If %>
|
|
<BR> </td></tr>
|
|
<BR> </table>
|
|
<BR>
|
|
<BR> <P>
|
|
<BR> <B>The Current time is <%=Time%> on <%=Date%><BR>
|
|
<BR> <% If (Request.Cookies ("NumVisits")>0) Then %>
|
|
<BR> You last visited this Web page at <%=LastAccessTime%> on <%=LastAccessDate%>
|
|
<BR> <% End If %>
|
|
<BR> </strong>
|
|
<BR> </P>
|
|
<BR>
|
|
<BR> </font>
|
|
<BR> </body>
|
|
<BR> </html>
|
|
</p>
|
|
</code>
|
|
|
|
<br><h4>DeleteCookies.asp</h4>
|
|
|
|
<p>
|
|
Open a new file in your text editor, paste in the following script, and save
|
|
the file as DeleteCookies.asp.
|
|
</p>
|
|
|
|
<code>
|
|
<p>
|
|
<BR> <%@ Language="VBScript" %>
|
|
<BR>
|
|
<BR> <html>
|
|
<BR> <head>
|
|
<BR> </head>
|
|
<BR>
|
|
<BR> <% If (Request.Cookies ("TextColor")="") Then %>
|
|
<BR> <body>
|
|
<BR> <font face="MS Gothic">
|
|
<BR> <% Else %>
|
|
<BR> <body bgcolor=<%=Request.Cookies("BackgroundColor")%> text=<%=Request.Cookies("TextColor")%>>
|
|
<BR> <font face="MS Gothic" color=<%=Request.Cookies("TextColor")%>>
|
|
<BR> <% End If %>
|
|
<BR>
|
|
<BR> <%
|
|
<BR> If Not ("" = Request.Cookies("NumVisits")) Then
|
|
<BR> Response.Cookies("NumVisits").Expires = "January 1, 1993"
|
|
<BR> Response.Cookies("LastDate").Expires = "January 1, 1993"
|
|
<BR> Response.Cookies("LastTime").Expires = "January 1, 1993" %>
|
|
<BR>
|
|
<BR> <H2 align=center>Persistent Cookies Are Deleted</H2>
|
|
<BR> <P>
|
|
<BR> The cookies used to keep track of your visits and date and time of last visit have been deleted.<BR>
|
|
<BR> Please click on <B>Set Cookies for Date, Time and Total Visits</B> to set your cookies again.
|
|
<BR> </P>
|
|
<BR>
|
|
<BR> <% Else %>
|
|
<BR>
|
|
<BR> <H2 align=center>No Persistent Cookies Are Deleted</H2>
|
|
<BR> <P>
|
|
<BR> There were no cookies set to keep track of your visits, and date and time of last visit.<BR>
|
|
<BR> Please click on <B>Set Cookies for Date, Time and Total Visits</B> to set your colors again.
|
|
<BR> </P>
|
|
<BR>
|
|
<BR> <% End If %>
|
|
<BR>
|
|
<BR> </font>
|
|
<BR> </body>
|
|
<BR> </html>
|
|
</p>
|
|
</code>
|
|
|
|
<BR><h3>Cookies Using the Session Object</h3>
|
|
|
|
<p>
|
|
With the <b>Session</b> object, you can create only an in-memory cookie. For the
|
|
<b>Session</b> object to work correctly, you need to determine when a user's visit
|
|
to the site begins and ends. IIS does this by using a cookie that stores an
|
|
ASP Session ID, which is used to maintain a set of information about
|
|
a user. If an ASP Session ID is not present, the server considers the current
|
|
request to be the start of a visit. The visit ends when there have been no
|
|
user requests for ASP files for the default time period of 20 minutes.
|
|
</p>
|
|
|
|
<p>
|
|
In this lesson, you will create the following:
|
|
</p>
|
|
|
|
<ul>
|
|
<li>
|
|
<B>Global.asa</B> Global.asa is a file that allows you to perform generic
|
|
actions at the beginning of the application and at the beginning of each user's
|
|
session. An application starts the first time the first user ever requests a
|
|
page and ends when the application is unloaded or when the server is taken
|
|
offline. A unique session starts once for each user and
|
|
ends 20 minutes after that user has requested their last page. Generic
|
|
actions you can perform in Global.asa include setting application or session
|
|
variables, authenticating a user, logging the date and time that a user
|
|
connected, instantiating COM objects that remain active for an entire application
|
|
or session, and so forth.
|
|
</li><li>
|
|
<B>VisitCount.asp</B> This ASP script uses the <b>Session</b> object to create an
|
|
in-memory cookie.
|
|
</li></ul>
|
|
|
|
<p>
|
|
When an application or session begins or ends, it is considered an event.
|
|
Using the Global.asa file, you can use the predefined event procedures that
|
|
run in response to the event.
|
|
</p>
|
|
|
|
<BR><h4>Global.asa </h4>
|
|
|
|
<p>
|
|
Open a new file in your text editor, paste in the following script, and save
|
|
the file in your root directory as <B>C:\Inetpub\Wwwroot\Global.asa</B>.
|
|
</P><P>
|
|
<B>Important:</B> Global.asa files must be saved in the root directory of
|
|
the application for ASP to find it. If you had a virtual path called Test
|
|
mapped to C:\Inetpub\Wwwroot\Test, your URL would be http://LocalHost/Test, and
|
|
the Global.asa file would have to go in C:\Inetpub\Wwwroot\Test. We did not
|
|
create a virtual path mapped to C:\Inetpub\Wwwroot\Tutorial, so our root
|
|
directory is still C:\Inetpub\Wwwroot.
|
|
</p>
|
|
|
|
<code>
|
|
<p>
|
|
<SCRIPT LANGUAGE=VBScript RUNAT=Server>
|
|
<BR>
|
|
<BR> 'Using application-level variables to track the number of users
|
|
<BR> ' that are currently looking at the site and the number that have
|
|
<BR> ' accessed the site.
|
|
<BR> Sub Application_OnStart
|
|
<BR>
|
|
<BR> 'Get the physical path to this vdir, and append a filename.
|
|
<BR> Application("PhysPath") = Server.MapPath(".") & "\hits.txt"
|
|
<BR>
|
|
<BR> 'Set some Visual Basic constants, and instantiate the FileSystemObject object.
|
|
<BR> Const cForReading = 1
|
|
<BR> Const cTristateUseDefault = -2
|
|
<BR> Set fsoObject = Server.CreateObject("Scripting.FileSystemObject")
|
|
<BR>
|
|
<BR> 'Get the last saved value of page hits and the date that it happened.
|
|
<BR> If fsoObject.FileExists(Application("PhysPath")) Then
|
|
<BR>
|
|
<BR> 'If the file hits.txt exists, set the Application variables.
|
|
<BR> Set tsObject = fsoObject.OpenTextFile(Application("PhysPath"), cForReading, cTristateUseDefault)
|
|
<BR> Application("HitCounter") = tsObject.ReadLine
|
|
<BR> Application("AppStartDate") = tsObject.ReadLine
|
|
<BR> tsObject.Close
|
|
<BR>
|
|
<BR> Else 'No file has been saved, so reset the values.
|
|
<BR>
|
|
<BR> Application("HitCounter") = 0
|
|
<BR> Application("AppStartDate") = Date
|
|
<BR>
|
|
<BR> End If
|
|
<BR>
|
|
<BR> Application("CurrentUsers") = 0
|
|
<BR>
|
|
<BR> End Sub
|
|
<BR>
|
|
<BR>
|
|
<BR> Sub Application_OnEnd
|
|
<BR>
|
|
<BR> Const cForWriting = 2
|
|
<BR> Const cTristateUseDefault = -2
|
|
<BR>
|
|
<BR> Set fsoObject = Server.CreateObject("Scripting.FileSystemObject")
|
|
<BR> If fsoObject.FileExists(Application("PhysPath")) Then
|
|
<BR>
|
|
<BR> 'If the file exists, open it for writing.
|
|
<BR> set tsObject = fsoObject.OpenTextFile(Application("PhysPath"), cForWriting, cTristateUseDefault)
|
|
<BR>
|
|
<BR> Else
|
|
<BR>
|
|
<BR> 'If the file doesn't exist, create a new one.
|
|
<BR> set tsObject = fsoObject.CreateTextFile(Application("PhysPath"))
|
|
<BR>
|
|
<BR> End If
|
|
<BR>
|
|
<BR> 'Write the total number of site hits and the last day recorded to the file.
|
|
<BR> tsObject.WriteLine(Application("HitCounter"))
|
|
<BR> tsObject.WriteLine(Application("AppStartDate"))
|
|
<BR> tsObject.Close
|
|
<BR>
|
|
<BR> End Sub
|
|
<BR>
|
|
<BR>
|
|
<BR> Sub Session_OnStart
|
|
<BR>
|
|
<BR> 'The Session time-out default is changed to 1 for the purposes of
|
|
<BR> ' this example.
|
|
<BR> Session.Timeout = 1
|
|
<BR>
|
|
<BR> 'When you change Application variables, you must lock them so that other
|
|
<BR> ' sessions cannot change them at the same time.
|
|
<BR> Application.Lock
|
|
<BR>
|
|
<BR> 'Increment the site hit counter.
|
|
<BR> Application("HitCounter") = Application("HitCounter") + 1
|
|
<BR> Application("CurrentUsers") = Application("CurrentUsers") + 1
|
|
<BR>
|
|
<BR> Application.UnLock
|
|
<BR>
|
|
<BR> End Sub
|
|
<BR>
|
|
<BR>
|
|
<BR> Sub Session_OnEnd
|
|
<BR>
|
|
<BR> Application.Lock
|
|
<BR>
|
|
<BR> 'Decrement the current user counter.
|
|
<BR> Application("CurrentUsers") = Application("CurrentUsers") - 1
|
|
<BR>
|
|
<BR> Application.UnLock
|
|
<BR>
|
|
<BR> End Sub
|
|
<BR>
|
|
<BR> </SCRIPT>
|
|
</p>
|
|
</code>
|
|
|
|
<BR><h4>VisitCount.asp</h4>
|
|
|
|
<p>
|
|
You can use variables set in Global.asa to measure visits and sessions.
|
|
</p>
|
|
|
|
<p>
|
|
Open a new file in your text editor, paste in the following script, and save
|
|
the file as <B>C:\Inetpub\Wwwroot\Tutorial\VisitCount.asp</B>. View the file
|
|
in your browser by typing
|
|
http://Localhost/Tutorial/VisitCount.asp. </p>
|
|
<p>Open a second instance of the browser to
|
|
http://Localhost/Tutorial/VisitCount.asp,
|
|
and click <B>Refresh</B> on the first browser. Total Visitors and Active Visitors
|
|
should increase by one. Close down the second browser, wait over a minute, and
|
|
click <B>Refresh</B> on the first browser. Active Visitors should decrease by one.
|
|
</p>
|
|
|
|
<code>
|
|
<p>
|
|
<% Response.Buffer = True%>
|
|
<BR>
|
|
<BR> <html>
|
|
<BR> <head>
|
|
<BR> <title>Retrieving Variables Set in Global.asa</title>
|
|
<BR> </head>
|
|
<BR> <body>
|
|
<BR> <font face="MS Gothic">
|
|
<BR>
|
|
<BR> <H3 align=center>Retrieving Variables Set in Global.asa</H3>
|
|
<BR> <P>
|
|
<BR> Total Visitors = <%=Application("HitCounter")%> since <%=Application("AppStartDate")%><BR>
|
|
<BR> Active Visitors = <%=Application("CurrentUsers")%>
|
|
<BR> </P>
|
|
<BR>
|
|
<BR> </font>
|
|
<BR> </body>
|
|
<BR> </html>
|
|
</p>
|
|
</code>
|
|
|
|
<BR><h2><a name="without">Maintaining Session State Without Cookies</a></h2>
|
|
|
|
<p>
|
|
Some browsers do not recognize cookies, and users can choose to disable cookies
|
|
in their browsers. The HTTP POST method provides an alternative to cookies
|
|
to maintain session state. The HTTP POST method provides the same
|
|
state information as would a cookie but has the advantage that it works even
|
|
when cookies are not available. This method is not common in practice, but it
|
|
is a good example to learn from. The HTTP POST method works similarly to an
|
|
in-memory cookie; user information can be maintained only during the visit, and
|
|
the session state information is gone when the user turns off the browser.
|
|
</p>
|
|
|
|
<BR><h3>DataEntry.asp</h3>
|
|
|
|
<p>
|
|
Open a new file in your text editor, paste in the following script, and save
|
|
the files as <B>C:\Inetpub\Wwwroot\Tutorial\DataEntry.asp</b>. View the file in your browser by typing
|
|
http://Localhost/Tutorial/DataEntry.asp.
|
|
</p>
|
|
|
|
<code>
|
|
<p>
|
|
<%@ Language=VBScript %>
|
|
<BR>
|
|
<BR> <html>
|
|
<BR> <head>
|
|
<BR> <title>Data Entry Without Cookies</title>
|
|
<BR> </head>
|
|
<BR> <body>
|
|
<BR> <font face="MS Gothic">
|
|
<BR>
|
|
<BR> <!-- In this example, subroutines are listed first.
|
|
<BR> There's a subroutine for each page of the order process.
|
|
<BR> The main calling code is at the bottom. -->
|
|
<BR>
|
|
<BR> <% Sub DisplayInitialPage %>
|
|
<BR>
|
|
<BR> <table border=1 cellpadding=3 cellspacing=0 width=500 bordercolor=#808080 align=center>
|
|
<BR> <tr><td bgColor=#004080 align=center>
|
|
<BR> <font color=#ffffff><H2>Order Form</H2></font>
|
|
<BR> </td></tr><tr><td bgColor=#e1e1e1 align=left>
|
|
<BR> <P><B>Step 1 of 4</B></P>
|
|
<BR> <P align=center>
|
|
<BR> This form uses the HTTP POST method to pass along hidden values that contain
|
|
<BR> your order information. This form does not use cookies.
|
|
<BR> </P>
|
|
<BR>
|
|
<BR> <FORM METHOD=POST ACTION="DataEntry.asp" NAME=DataEntryForm>
|
|
<BR> <P>Enter your name
|
|
<BR> <INPUT TYPE="TEXT" NAME=FullName>
|
|
<BR> <BR>Enter your imaginary credit card number
|
|
<BR> <INPUT TYPE="TEXT" NAME=CreditCard>
|
|
<BR> </P>
|
|
<BR> <!-- Keeps track of the information by using the hidden HTML form variable Next Page. -->
|
|
<BR> <INPUT TYPE="HIDDEN" NAME=NextPage VALUE=2>
|
|
<BR> <INPUT TYPE="SUBMIT" VALUE="Next ->" NAME=NextButton>
|
|
<BR> </FORM>
|
|
<BR>
|
|
<BR> </td></tr>
|
|
<BR> </table>
|
|
<BR>
|
|
<BR> <% End Sub %>
|
|
<BR>
|
|
<BR>
|
|
<BR> <% Sub DisplayDogBreed %>
|
|
<BR>
|
|
<BR> <table border=1 cellpadding=3 cellspacing=0 width=500 align=center>
|
|
<BR> <tr><td bgColor=#004080 align=center>
|
|
<BR> <font color=#ffffff><H2>Order Form</H2></font>
|
|
<BR> </td></tr><tr><td bgColor=#e1e1e1>
|
|
<BR> <P><B>Step 2 of 4</B></P>
|
|
<BR> <P align=center>
|
|
<BR> Please select the type of dog you want.
|
|
<BR> </P>
|
|
<BR>
|
|
<BR> <FORM METHOD=POST ACTION="DataEntry.asp" NAME=DataEntryForm>
|
|
<BR> <P>
|
|
<BR> <INPUT TYPE=RADIO NAME=DogSelected VALUE="Cocker Spaniel" CHECKED>Cocker Spaniel<BR>
|
|
<BR> <INPUT TYPE=RADIO NAME=DogSelected VALUE="Doberman">Doberman<BR>
|
|
<BR> <INPUT TYPE=RADIO NAME=DogSelected VALUE="Timber Wolf">Timber Wolf<BR>
|
|
<BR> <INPUT TYPE=RADIO NAME=DogSelected VALUE="Mastiff">Mastiff<BR>
|
|
<BR> </P>
|
|
<BR> <!--Keeps track of the information by using the hidden HTML form variable Next Page. -->
|
|
<BR> <INPUT TYPE="HIDDEN" NAME=NextPage VALUE=3>
|
|
<BR> <INPUT TYPE="SUBMIT" VALUE="Next ->" NAME=NextButton>
|
|
<BR> </FORM>
|
|
<BR> </td></tr>
|
|
<BR> </table>
|
|
<BR>
|
|
<BR> <% End Sub %>
|
|
<BR>
|
|
<BR>
|
|
<BR> <% Sub DisplayCity %>
|
|
<BR>
|
|
<BR> <table border=1 cellpadding=3 cellspacing=0 width=500 align=center>
|
|
<BR> <tr><td bgColor=#004080 align=center>
|
|
<BR> <font color=#ffffff><H2>Order Form</H2></font>
|
|
<BR> </td></tr><tr><td bgColor=#e1e1e1>
|
|
<BR> <P><B>Step 3 of 4</B></P>
|
|
<BR> <P align=center>
|
|
<BR> We deliver from the following cities. Please choose the one closest to you.
|
|
<BR> </P>
|
|
<BR>
|
|
<BR> <FORM METHOD=POST ACTION="DataEntry.asp" NAME=DataEntryForm>
|
|
<BR> <P>
|
|
<BR> <INPUT TYPE=RADIO NAME=CitySelected VALUE="Seattle" CHECKED>Seattle<BR>
|
|
<BR> <INPUT TYPE=RADIO NAME=CitySelected VALUE="Los Angeles">Los Angeles<BR>
|
|
<BR> <INPUT TYPE=RADIO NAME=CitySelected VALUE="Boston">Boston<BR>
|
|
<BR> <INPUT TYPE=RADIO NAME=CitySelected VALUE="New York">New York<BR>
|
|
<BR> </P>
|
|
<BR> <!--Keeps track of the information by using the hidden HTML form variable Next Page. -->
|
|
<BR> <INPUT TYPE="HIDDEN" NAME=NextPage VALUE=4>
|
|
<BR> <INPUT TYPE="SUBMIT" VALUE="Next ->" NAME=NextButton>
|
|
<BR> </FORM>
|
|
<BR> </td></tr>
|
|
<BR> </table>
|
|
<BR>
|
|
<BR> <% End Sub %>
|
|
<BR>
|
|
<BR>
|
|
<BR> <% Sub DisplaySummary %>
|
|
<BR>
|
|
<BR> <table border=1 cellpadding=3 cellspacing=0 width=500 align=center>
|
|
<BR> <tr><td bgColor=#004080 align=center>
|
|
<BR> <font color=#ffffff><H2>Order Form Completed</H2></font>
|
|
<BR> </td></tr><tr><td bgColor=#e1e1e1>
|
|
<BR> <P><B>Step 4 of 4</B></P>
|
|
<BR> <P align=center>
|
|
<BR> The following information was entered.<BR>
|
|
<BR> A transaction will now be executed to complete your order if your name and
|
|
<BR> credit card are valid.
|
|
<BR> </P>
|
|
<BR> <table cellpadding=4>
|
|
<BR> <tr bgcolor=#ffffcc><td>
|
|
<BR> Name
|
|
<BR> </td><td>
|
|
<BR> <%=Session.Value("FullName")%>
|
|
<BR> </td></tr><tr bgcolor=Beige><td>
|
|
<BR> Credit Card
|
|
<BR> </td><td>
|
|
<BR> <%=Session.Value("CreditCard")%>
|
|
<BR> </td></tr><tr bgcolor=Beige><td>
|
|
<BR> Dog Ordered
|
|
<BR> </td><td>
|
|
<BR> <%=Session.Value("DogSelected")%>
|
|
<BR> </td></tr><tr bgcolor=Beige><td>
|
|
<BR> City Ordered From
|
|
<BR> </td><td>
|
|
<BR> <%=Session.Value("CitySelected")%>
|
|
<BR> </td></tr>
|
|
<BR> </table>
|
|
<BR> </td>
|
|
<BR> </tr>
|
|
<BR> </table>
|
|
<BR>
|
|
<BR> <% End Sub %>
|
|
<BR>
|
|
<BR>
|
|
<BR> <% Sub StoreUserDataInSessionObject %>
|
|
<BR> <%
|
|
<BR> Dim FormKey
|
|
<BR> For Each FormKey in Request.Form
|
|
<BR> Session(FormKey) = Request.Form.Item(FormKey)
|
|
<BR> Next
|
|
<BR> %>
|
|
<BR> <% End Sub %>
|
|
<BR>
|
|
<BR>
|
|
<BR> <%
|
|
<BR> 'This is the main code that calls all the subroutines depending on the
|
|
<BR> ' hidden form elements.
|
|
<BR>
|
|
<BR> Dim CurrentPage
|
|
<BR>
|
|
<BR> If Request.Form.Item("NextPage") = "" Then
|
|
<BR> CurrentPage = 1
|
|
<BR> Else
|
|
<BR> CurrentPage = Request.Form.Item("NextPage")
|
|
<BR> End If
|
|
<BR>
|
|
<BR> 'Save all user data so far.
|
|
<BR> Call StoreUserDataInSessionObject
|
|
<BR>
|
|
<BR> Select Case CurrentPage
|
|
<BR> Case 1 : Call DisplayInitialPage
|
|
<BR> Case 2 : Call DisplayDogBreed
|
|
<BR> Case 3 : Call DisplayCity
|
|
<BR> Case 4 : Call DisplaySummary
|
|
<BR> End Select %>
|
|
<BR>
|
|
<BR> <BR>
|
|
<BR> <HR>
|
|
<BR> <H3 align=center><A HREF="DataEntry.asp">Reset Order</A></H3>
|
|
<BR>
|
|
<BR> </font>
|
|
<BR> </body>
|
|
<BR> </html>
|
|
</p>
|
|
</code>
|
|
|
|
|
|
|
|
<hr class="iis" size="1">
|
|
<p align=center><a href="/iishelp/common/colegal.htm"><em>© 1997-2001 Microsoft Corporation. All rights reserved.</em></a></p>
|
|
</font>
|
|
</body>
|
|
</html>
|