01-06-2005, 09:51 PM
:D Is there an alternative code that I can use to check if the user is still connected to my site, without the use of any of the functions in the global.asa file.....
I wanna do a database operation when the user is disconnected after a certain time interval....
Any suggestions anyone?
Thanks in advance
:thumbsup: :p :D :)
:cool: ;) :rolleyes:
01-10-2005, 07:11 PM
Sure, what I do is have a table of users who are connected and have one of the database columns with data type of date/time, another is the username, and another is the session id. Then I have code that will update the date time field each time a user changes a page or refreshes the page. This will be run on everypage as an include statement. Then on the page that displays who is on, 1st I run a delete statement of all records where the connection is over a certain amount of time. (just in case the user doesnt log off) Then I run a select statement to display the current list. For users who arent logged in i do a select count(sessionId) as [anon users] from connections where username = '' to tell how many anonymous users are online.
01-11-2005, 01:24 AM
Okay thanks for that suggestion....
But i was hoping that I could get a database-less method to check if the user is still connected.
Just really curious
01-11-2005, 05:26 AM
I don't know if this is what you need - Response.IsClientConnected (http://www.devguru.com/Technologies/asp/quickref/response_isclientconnect.html)