注销功能的源代码 [英] source code for log out function

查看:178
本文介绍了注销功能的源代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想要注销功能的源代码,一旦我从站点注销,就不应再次返回同一页面,而应该在登录页面中.oly

I want source code for logout function and once if i logout from my site it should not again return back to the same page it should be in the login page oly

推荐答案

基本代码将类似于..
Basic code would be something like..
protected void Page_Load(object sender, EventArgs e)
{
     Session.Abandon();   //restrict redirecting to same page and browser back button  
     Session.Clear();  
     Response.Redirect(clsCommon.value("login.aspx?mode=logout");
}


另请参阅..
http://aspnet-with- c-sharp.blogspot.com/2010/12/coding-of-logout-button-in-aspnet-c.html [ http://msdn.microsoft.com/en-us/library/aa288576%28v = vs.71%29.aspx [ ^ ]
http: //stackoverflow.com/questions/1037620/login-or-signout-problem-in-asp-net-c-sharp-using-master-page-and-windows-authe [


Also see..
http://aspnet-with-c-sharp.blogspot.com/2010/12/coding-of-logout-button-in-aspnet-c.html[^]
http://msdn.microsoft.com/en-us/library/aa288576%28v=vs.71%29.aspx[^]
http://stackoverflow.com/questions/1037620/logout-or-signout-problem-in-asp-net-c-sharp-using-master-page-and-windows-authe[^]


这篇关于注销功能的源代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆