I have link at my asp.net page. I need to store some data in session before user goes to that link location. Is there any event that I can catch when user going to leave that page?
PS
I can’t store that data when user click on link. I need event on leaving page.
The way the web works is stateless. The server is not aware of your user leaving a page. It is only aware of a new request that is coming in, which would happen after the user clicked on a certain link.
If you wanted to store data in the session before that link was clicked, you would have to store it in the session on the previous request when you were generating the page containing the link.