Hi All
I Want to use one method in Browser [X] button.. but its not working here is code ..
I use this shot of code in Master.aspx page
--------------------------------------------------
<body onunload="signOut();">
<script type="text/javascript" language="javascript">
function signOut()
{
PageMethods.signOut();
}
</script>
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePageMethods="true" />
in .cs file the method is
------------------------------
public void signOut()
{
Session["UserName"] = null;
Session["UserName"] = "";
Session.Abandon();
FormsAuthentication.SignOut();
Response.Redirect("~/Logon.aspx");
}
Can any body suggest why its not working for browser [X] button..
the same method working for my Logout Button. but if the user close the browser i want to call this method..
Need a quick help...?
susant