home *** CD-ROM | disk | FTP | other *** search
/ Chip 1998 February / CHIP_2_98.iso / software / pelne / optionp / iis4_07.cab / Session_VBScript.asp < prev    next >
Text File  |  1997-10-25  |  1KB  |  53 lines

  1. <%@ LANGUAGE = VBScript %>
  2. <%  Option Explicit     %>
  3.  
  4. <%
  5.     ' Ensure that this page is not cached
  6.     Response.Expires = 0
  7. %>
  8.  
  9. <HTML>
  10.     <HEAD>
  11.         <TITLE>Using Session Variables</TITLE>
  12.     </HEAD>
  13.  
  14.     <BODY BGCOLOR="White" topmargin="10" leftmargin="10">
  15.  
  16.         <!-- Display Header -->
  17.  
  18.         <font size="4" face="Arial, Helvetica">
  19.         <b>Using Session Variables</b></font><br>
  20.       
  21.         <hr size="1" color="#000000">
  22.  
  23.  
  24.         <%
  25.             ' If this is the first time a user has visited
  26.             ' the page, initialize Session Value
  27.  
  28.             If (Session("SessionCountVB") = "") Then 
  29.                 Session("SessionCountVB") = 0
  30.             End If
  31.  
  32.  
  33.             ' Increment the Session PageCount by one.
  34.             ' Note that this PageCount value is only
  35.             ' for this user's individual session
  36.  
  37.             Session("SessionCountVB") = Session("SessionCountVB") + 1
  38.         %>
  39.  
  40.  
  41.         <!-- Output the Session Page Counter Value -->
  42.  
  43.         You have personally visited this page 
  44.         <%=Session("SessionCountVB")%> times!
  45.  
  46.  
  47.         <!-- Provide a link to revisit the page -->
  48.  
  49.         <p><A href = "Session_VBScript.asp">Click here to visit it again</A>
  50.  
  51.     </BODY>
  52. </HTML>
  53.