Exiting IE Browser

F

fniles

I am using classic ASP.
Is there a way when a user close the IE browser for me to know and execute
some ASP codes ?
What I need is, when they close the IE browser, I would like to go to the
database and modify some data there.
In VB, there is Form_close event. Where in ASP I can put my codes when they
exit the IE browser ?
Thank you.
 
B

Bob Barrows [MVP]

fniles said:
I am using classic ASP.
Is there a way when a user close the IE browser for me to know and
execute some ASP codes ?
What I need is, when they close the IE browser, I would like to go to
the database and modify some data there.
In VB, there is Form_close event. Where in ASP I can put my codes
when they exit the IE browser ?
Thank you.

No there isn't. Sorry. You will need to use a scheduled task to do your
cleanup. See
http://classicasp.aspfaq.com/general/how-do-i-count-the-number-of-current-users/sessions.html
 
F

fiefie.niles

Thank you.

1. Can I put my clean up codes in the Session_OnEnd or
Application_OnEnd in Global.asa ?
2. In Session_OnEnd or Application_OnEnd, can I do Response.Redirect
"anotherpage.asp" ?

Thank you.
 
A

Anthony Jones

1. Can I put my clean up codes in the Session_OnEnd or
Application_OnEnd in Global.asa ?
2. In Session_OnEnd or Application_OnEnd, can I do Response.Redirect
"anotherpage.asp" ?

I wouldn't trust either of these.

Store a session expiry value in the database and have a scheduled task tidy
up any session that has expired.

Give the user a 'log out' option in your HTML so that there is an option to
explicitly close things out. At the point navigate to a Logged out page (or
the login/home page).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top