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

  1. <%@ Language=VBScript    %>
  2. <% Option Explicit        %>
  3.  
  4. <HTML>
  5.     <HEAD>
  6.         <TITLE>Client Connection</TITLE>
  7.     </HEAD>
  8.  
  9.     <BODY bgcolor="white" topmargin="10" leftmargin="10">
  10.         
  11.         <!-- Display Header -->
  12.  
  13.         <font size="4" face="Arial, Helvetica">
  14.         <b>Client Connection</b></font><br>   
  15.  
  16.         <p>About to perform compute intensive operation<br>
  17.  
  18.         <%
  19.             Dim x, i
  20.             x = 1
  21.         
  22.         
  23.             ' Perform a long operation.....
  24.  
  25.             For i = 1 to 1000
  26.                 x = x + 5                
  27.             Next
  28.  
  29.  
  30.             ' Check to see if the client is still connected
  31.             ' before doing anything more
  32.  
  33.             If Response.IsClientConnected Then 
  34.  
  35.                 ' Ouput Status
  36.                 Response.Write "User is still connected<br>"
  37.  
  38.  
  39.                 ' Perform another long operation
  40.  
  41.                 For i = 1 to 1000
  42.                     x = x + 5                
  43.                 Next
  44.                 
  45.             End If
  46.  
  47.             
  48.             ' If the user is still connected, send back
  49.             ' a closing message
  50.             
  51.             If Response.IsClientConnected Then 
  52.  
  53.                 Response.Write "<p>Finished<br>"
  54.                 Response.Write "Thank you for staying around!  :-)"
  55.  
  56.             End If
  57.         %>
  58.  
  59.     </BODY>
  60. </HTML>
  61.