关于注销会话的错误 [英] Error Regarding the logout the session

查看:67
本文介绍了关于注销会话的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的问题是..当我要从用户模块注销我的网站时,发生了验证错误..即使在母版页上写出注销会话之后......请帮助我......

My question is that..ke when i going to logout my website from user module the validation error is occurred ..even after the log out session is written on master page...plz help me...

推荐答案

引用:

当我要从用户模块注销我的网站时,验证错误是已发生

when i going to logout my website from user module the validation error is occurred



要解决此问题,请将 CuasesValidation =false设置为Log Out LinkBut​​ton

试试这个:

HTML:


To solve this problem, set CuasesValidation="false" to your Log Out LinkButton.
Try this:
HTML:

<asp:linkbutton id="btnLogOut" runat="server" causesvalidation="false" text="Log Out" onclick="btnLogOut_Click" xmlns:asp="#unknown" />



代码背后:


Code Behind:

protected void LinkButton_Click(object sender, EventArgs e) 
{
    Session.Abandon();
    Response.Redirect("Login.aspx");
}




引用:

写出注销会话后母版页。

after the log out session is written on master page.



这部分问题我不明白。清除会话后,如上例所示,你不会得到这样的错误。





--Amit


This part of your question I din''t understand. After clearing the session like the above example, you wont get the error like this.


--Amit


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

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