Browser Close Event

N

Navin

which event is fired when a browser is closed.
i want to call asp page which deleet some files on the server.
i tired using onunload event but it aslo get fired when a page is refreshed.
the thing should work in netsacpe also.
please advise me .
regds,
Navin Mahindroo
 
K

Karim Dahdah

Hello Navin,

You can try to do it with the global.asa file in your web
project. Use one of the

Application_OnStart
This event occurs when the FIRST user calls the first
page. This event occurs after the Web server is restarted
or after the Global.asa file is edited.
The "Session_OnStart" event occurs immediately after this
event.

Session_OnStart
This event occurs EVERY time a NEW user requests his or
hers first page in the ASP application.

Session_OnEnd
This event occurs EVERY time a user ends a session. A user
ends a session after a page has not been requested by the
user for a specified time (by default this is 20 minutes).

Application_OnEnd
This event occurs after the LAST user has ended the
session. Typically, this event occurs when a Web server
stops. This procedure is used to clean up settings after
the Application stops, like delete records or write
information to text files.

Restrictions:
- You can not display text that is written in the
Global.asa file. This file can't display information.
- You can only use Server and Application objects in the
Application_OnStart and Application_OnEnd subroutines. In
the Session_OnEnd subroutine, you can use Server,
Application, and Session objects. In the Session_OnStart
subroutine you can use any built-in object


Best regards,
Karim
 

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
474,085
Messages
2,570,597
Members
47,218
Latest member
GracieDebo

Latest Threads

Top