Urgent...trapping User's Browser closing event....

C

Chirag Malvi

hello all,

I am developing the web application using ASP.net and VS.2003 IDE.

here is the situation which i want to implement.

1) User is browsing some webform. I want to trap this event. this i am doing
with Session_Onstart.
2) Now when user is exiting i.e. closing the browser window i want to trap
this event and perform some operation. I tried using Session_OnEnd event,but
this event will get generated when time out of the session occurs or when
the session is abandon by the application. hence it is not serving my
purpose.

can any body help me in trapping the user's browser closing event or with
any other options??

thanks in advance

regards
chirag
 
J

Jim Cheshire [MSFT]

Chirag,

You will need to handle that on the client, not in your server-side ASP.NET
code. ASP.NET operates over HTTP, and HTTP is a connectionless protocol.
Your ASP.NET application has no knowledge whatever of the client machine.
Client-side events such as the browser window closing cannot be handled on
the server.

I'm not aware of a client-side event that will handle the closing of the
browser window, but there may be some in the group who are better versed on
client side code than I am. I don't deal much with client side code in my
position.

Jim Cheshire [MSFT]
Developer Support
ASP.NET
(e-mail address removed)

This post is provided as-is with no warranties and confers no rights.


--------------------
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top