Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts

    When response.isClientConnected=false

    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
    rs.movenext
    loop

    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?

  • #2
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,075
    Thanks
    0
    Thanked 256 Times in 252 Posts
    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.
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________

  • #3
    Regular Coder
    Join Date
    Dec 2004
    Location
    Jamaica
    Posts
    592
    Thanks
    2
    Thanked 0 Times in 0 Posts
    thanks alot... okay. So thats what happens huh?


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •