Hi.. Is there anyway to fires Session.Abandon when the browser is closed? I know that we can use javascript function onUnload. <script language="JavaScript"> </script> However, this event will also be fired when the user is redirected to another page/ when
the page is reloaded. Actually only when the browser is closed I want to: 1.Call session.Abandon to end the session 2.This session.Abandon will fires session_end() event handler in the global.asax files. 3.Inside session_end handler, I will unlock all the
records for current user. Since I set the session timeout to 60 minutes it's impossible for me to wait until the session is over to unlock all records when the user just close the browser and go. Any suggestion is most welcomed. Thank you in advanced. Sincerely
Agustina
This is a common problem and one that, unfortunately, doesn't really have a solution. You could use a frame that has one row/column (which contains the rest of your site) and use the onunload event in the frame, however this is not a particularly attractive
solution.
agustina_s
Member
400 Points
80 Posts
fires event and call session.abandon when the browser is closed
Sep 23, 2003 07:56 AM|LINK
stevenbey
All-Star
16526 Points
3378 Posts
Re: fires event and call session.abandon when the browser is closed
Sep 23, 2003 11:43 AM|LINK
http://stevenbey.com
Recursion: see Recursion