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

  1. <%@ Language=JScript        %>
  2.  
  3.  
  4. <%
  5.     // Ensure that this page is not cached
  6.     
  7.     Response.Expires = 0;
  8. %>
  9.  
  10.  
  11. <HTML>
  12.     <HEAD>
  13.         <TITLE>Page Counter</TITLE>
  14.     </HEAD>
  15.  
  16.     <BODY bgcolor="white" topmargin="10" leftmargin="10">
  17.         
  18.         <!-- Display Header -->
  19.  
  20.         <font size="4" face="Arial, Helvetica">
  21.         <b>Page Counter Component</b></font><br>   
  22.  
  23.         <%
  24.             // Instantiate Page Counter Component    
  25.  
  26.             var MyPageCounter;
  27.             MyPageCounter = Server.CreateObject("MSWC.PageCounter");
  28.  
  29.  
  30.             // Determine the number of page hits
  31.             
  32.             var HitMe;
  33.             HitMe = MyPageCounter.Hits("/iissamples/sdk/asp/components/PageCounter_JScript.asp");
  34.  
  35.  
  36.             // Output the number of hits to the page
  37.  
  38.             Response.Write("<p>Times visited: " + HitMe);
  39.         %>
  40.         
  41.         <p><A href=PageCounter_JScript.asp> Click here to revisit Page </A>
  42.         
  43.     </BODY>
  44. </HTML>
  45.