473,326 Members | 2,182 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 software developers and data experts.

Browser Close Event

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
Jul 19 '05 #1
1 4684
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

-----Original Message-----
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
.

Jul 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
by: hawkon | last post by:
Hi all, I have an important question to ask about how to trap events when the user close the browser window. I'm a ASP programmer and I have s MSSQL database with a user table where I'm able to...
1
by: Matt | last post by:
When we refresh the page (F5, or icon in browser), it will first trigger ONUNLOAD event and then trigger ONLOAD event. When we close the browser (X on right top icon), it will trigger ONUNLOAD...
3
by: Bond | last post by:
how do I know when the browser is making a request to the server? I am not having an onclick event for EVERY hyperlink, submit, etc. There must be some javascript function that I can overwrite...
3
by: Denon | last post by:
How to trap browser close event in SERVER side? I read a lot of forum message, it talk about onclose(), onunload() and even onbeforeunload() event. However, all of theses are based on javascript...
3
by: =B= | last post by:
Hi all, I was wondering if anyone has had any luck with trapping the <BODY> onUnload() event in ASP.NET? The thing is, I'm writing code for an Intranet site. The code makes a call to a...
4
by: Bill Manring | last post by:
I need to capture the event when the user closes the browser in my application. I have some code in the session_End event, which works fine when the session times out, but I need to end the...
6
by: hemant.singh | last post by:
Hi all, I am trying to get a way by which I'll know exactly when user goes out of my site by clicking on close button in browser, So that w/e user click close button in browser, I can send a...
1
by: baburk | last post by:
Hi, I wants to capture browser tab close event? I got for window close event. if((window.event.clientX<0) || (window.event.clientY<0)) { }
3
by: Gouri.Mahajan7 | last post by:
Hello, I am new to asp.net. Can anybody please tell me which event is fired when we close the browser. I want to remove some resources when the browser close button is pressed. Thanks in advance....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.