follow this link<BR><BR>I did something like this but I have my page automactially refreshing so i made some changes and new code is<BR>&#060;script language="JavaScript"&#062;<BR> <BR> var win = null; <BR> win = window.self.closed;<BR> function chkifclosed()<BR> {<BR> if (win)<BR> endSession();<BR> else<BR> doLoad();<BR> }<BR> var sURL = unescape(window.location.pathname);<BR> function doLoad()<BR> {<BR> setTimeout( "refresh()", 9*1000 );<BR> }<BR> <BR> function refresh()<BR> {<BR> window.location.href = sURL;<BR><BR> }<BR> <BR> function endSession()<BR> {<BR>"frmlogout.aspx");<BR> }<BR> &#060;/script&#062;<BR>I think problem is i am calling window.self.closed, on browser closed this should be true but It is never true in my case and i think because I am not calling Javascript to open the page. I am calling from my application response.redirect? any idea i cannot use unload because i will not know the difference in browser closed.<BR>I basically want to capture breowser closed.<BR>I tried using shwdocvw but no luck need help?