i have wriiten code for event when user closes browser directly.
my code is following in javascript for onbeforeunload event
function handleWindowClose()
{
if((window.event.clientX<0) || (window.event.clientY<0))
{
var xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
xmlhttp.open("GET"," AbandonSession.aspx",false); //here i made session abondon.
xmlhttp.send();
return;
}
}
but problem is when i refreshes then also application closes...
why?