注销后,ASP.NET显示最后一页. [英] ASP.NET shows the last page after loggin out..

查看:57
本文介绍了注销后,ASP.NET显示最后一页.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨Frnds,

当我在asp.net 4.0中退出应用程序时,我尝试返回上一页...令人惊讶的是,它向我显示了最后一页(但是,当我单击链接时,它没有用)...有人可以给我吗?我在asp.net中会了解这种行为的详细信息...以及解决方案

="blockquote> http://www.codeproject.com/search.aspx?q=asp.net+logout&x=0&y=0&sbo=qa&usfc=false [ < http-equiv =" 内容 =" 不存储" / > < =" 到期" 内容 0 " / < =" pragma" 内容 否-cache" / >



在您的页面加载中,

 Response.Cache.SetCacheability(Httpcacheability.Nocache)
Response.ExpiresAbsolute = Now()- 1 
Response.CacheControl = "  



请使用您的IDE检查语法.


Hi Frnds,

When i log out in my application in asp.net 4.0, i tried to go to back page...surprisingly it showed me the last page(however, when i clicked on a link, it didnt work)...can somebody give me the details of this kind of behaviour in asp.net ...and a resolution ??

Browser back button issue after logout[^]

Quick Search: http://www.codeproject.com/search.aspx?q=asp.net+logout&x=0&y=0&sbo=qa&usfc=false[^]


What you can do is to prevent from chasing. So if a page is not being cached at client then browser back button will not allow a user to navigate to that page. Or else you can forward the user interaction on forward all the time, but in that case browser back button will makes you lots of trouble on you.

Control the cache by adding the following on header.

<meta http-equiv="cache-control" content="no-store" />
<meta http-equiv="expires" content="0" />
<meta http-equiv="pragma" content="no-cache" />



On your page load,

Response.Cache.SetCacheability(Httpcacheability.Nocache)
Response.ExpiresAbsolute = Now() - 1
Response.CacheControl = "no-cache"



Please check the syntax with your IDE.


这篇关于注销后,ASP.NET显示最后一页.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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