Asp.Net Session,无法从我使用按钮注销的验证页面注销。 [英] Asp.Net Session, cannot logout from validation page where i use button for logout.

查看:164
本文介绍了Asp.Net Session,无法从我使用按钮注销的验证页面注销。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为大学做一个项目,我已经在我的表单上添加了验证,当我打开此表单并单击该页面上的注销按钮时,它显示验证错误消息并且不会让我退出。请建议我

I am doing a project for college, i had added validation on my form, when i open this form and i click log out button on that page it shows validation error messages and wont let me log out. please suggest me

推荐答案

public ActionResult Logout()

{

FormsAuth.SignOut();

返回RedirectToAction(Index,Home);

}







你试过这个吗?
public ActionResult Logout()
{
FormsAuth.SignOut();
return RedirectToAction("Index", "Home");
}



Have you tried this ?


这篇关于Asp.Net Session,无法从我使用按钮注销的验证页面注销。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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