How to know when the window of my application is closed?
Hi,
I would like to run a function when I close the window of my application. For example, imagine that what I would like to do is to open a new window when I close the window of my application. (This is just a example of a function to test my problem)
The code would look like this:
Response.Write("");
I tried many solutions, but I haven't found yet anyone that works.
If I put this code in the PAGE_UNLOAD event, this would fire everytime that the page refresh, and this means that a new window is opened everytime I click on a button, select in a dropdownlist and so....
If I put the code in the PAGE_DISPOSED event, or in the SESSION_ENDS or APPLICATION_ENDS of the Global.asax.cs file, the code is not executed so the new window is not opened when closing my application.
After this, I tried to put that between the tags or