%@ Language=VBScript %> <% Option Explicit %>
About to perform compute intensive operation
<%
Dim x, i
x = 1
' Perform a long operation.....
For i = 1 to 1000
x = x + 5
Next
' Check to see if the client is still connected
' before doing anything more
If Response.IsClientConnected Then
' Ouput Status
Response.Write "User is still connected
"
' Perform another long operation
For i = 1 to 1000
x = x + 5
Next
End If
' If the user is still connected, send back
' a closing message
If Response.IsClientConnected Then
Response.Write "
Finished
"
Response.Write "Thank you for staying around! :-)"
End If
%>