Author: xmen | Posted on: 11/28/2010 11:36:17 PM | Views : 606

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 ...