Since I start hating postbacks, I use WS or PageMethod for every client to server process. I did same for Logout but Im not sure in this.
I wrote code like this
//In WS
[WebMethod()]
[ScriptMethod(UseHttpGet = false)]
public void LogOut()
{
try
{
FormsAuthentication.SignOut();
Roles.DeleteCookie();
}
catch(Exception ex)
{
throw new Exception(Global.GetError(ex));
}
}
//on aspx
function LogOut() {
try {
Sys.Net.WebServiceProxy.invoke("/Webutils.asmx", "LogOut", false, null,
function(res) {
window.location.reload();
},
...
Go to the complete details ...