退出菜单项 [英] logout for menu item
本文介绍了退出菜单项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
你好,
我想要Web应用程序的注销代码....
我有一个母版页,因为我要添加一个菜单项,即注销
在这里,我想一旦我们从应用程序注销就无法导航回去.
删除了空代码块[/编辑]
hello,
i want logout code for web application....
i have a master page.in that i''m adding a menu item ie,logout
here i want once we logout from the application can''t navigate to back.
Removed empty code block[/Edit]
推荐答案
如果您正在使用成员身份(也许应该使用),这很简单:
If you are using Membership (and you probably should be) it is pretty simple:
FormsAuthentication.SignOut();
MSDN [
MSDN[^]
You can then use Response.Redirect to the your Home page, or
FormsAuthentication.RedirectToLoginPage();
将其发送回登录.
^ ]
http://an-it- solution.blogspot.com/2008/12/if-you-have-master-page-then-write-this.html [ http://forums.asp.net/t/1427540.aspx [注销后禁用浏览器的后退功能 [
Logout code in asp.net c# for admin which have master page[^]
http://an-it-solution.blogspot.com/2008/12/if-you-have-master-page-then-write-this.html[^]
http://forums.asp.net/t/1427540.aspx[^]
Disabling browser’s back functionality after logout[^]
这篇关于退出菜单项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文