View Full Version : When response.isClientConnected=false

01-24-2005, 10:47 PM
When does response.isClientConnected=false or is it just REALLY the true property that you can test for? In that.... what i'm really trying to ask is this:

I've seen code where they do summin like:
'About to print out records
do while not RS.EOF AND response.clientConnected
'do stuff

When exactly is the user no longer connected (when response.isClientConnected=false) and can you do stuff when the value of response.isClientConnected changes? Like make changes to a database?

01-25-2005, 04:04 AM
response.isClientConnected returns false when the user click the Stop button of the browser while the processing of the asp page is ongoing. In the code you posted, if the processing is currently inside the loop and the user suddenly click the Stop button, the loop terminates causing partial display of the records. That's good because by default, when the Stop button is clicked, the processing of asp codes continues. So adding response.clientConnected check unloads useless server resources that may result from stopping the execution abruptly.

01-25-2005, 09:33 AM
thanks alot... okay. So thats what happens huh? :thumbsup: