<%@ LANGUAGE = JScript %> Client Connection Client Connection

About to perform a compute intensive operation...
<% var x, i; x = 1; //Perform a long operation. for(i = 0; i < 1000; i++) { x = x + 5; } //Check to see if the client is still //connected before doing anything more. if (Response.IsClientConnected()) { //Ouput Status. Response.Write("User still connected
"); //Perform another long operation. for (i = 1; i < 1000; i++) { x = x + 5; } } //If the user is still connected, send back //a closing message. if (Response.IsClientConnected()) { Response.Write("

Finished
"); Response.Write("Thank you for staying around! :-)"); } %>