inherit ICallbackEventHandler this eventhandler it ca automatically create two methods one is return results another one is store the values and close the i mean kill the sessions.
public partial class
this event handler is catch the browser information whn browser naviage or close it can handle.
public partial class sample : System.Web.UI.Page, ICallbackEventHandler
{
protected void Page_Load(object sender, EventArgs e)
{
ClientScriptManager cm = Page.ClientScript;
String cbReference = cm.GetCallbackEventReference(this, "arg", "ReceiveServerData", "");
String callbackScript = "function CallServer(arg, context) {" + cbReference + "; }";
cm.RegisterClientScriptBlock(this.GetType(), "CallServer", callbackScript, true);
}
public string GetCallbackResult()
{
return "Success";
}
public void RaiseCallbackEvent(string eventArgument)
{
}
}
before writing this you can take .js file
write like this and refere all .aspx pages
function confirmExit() {
}
function ReceiveServerData(arg, context) {
}