注销后如何使用后退按钮 [英] how to use back button after logout

查看:62
本文介绍了注销后如何使用后退按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

亲爱的


在asp.net中注销后如何使用后退"按钮.
请指导我.

Hi Dear


How to use Back Button after logout i asp.net.
Pls Guide me .

推荐答案

尝试一下...
1.清除会话
2.清除缓存,使浏览器没有历史记录(这将使浏览器中的后退/前进"按钮变为灰色).
清除缓存的代码可以放在下面的代码中:
Try this...
1. Clear the sessions
2. Clear the cache such that browser has no history (this will make back/forward button in browser grayed out disabled.)
code for clearing cache can be put up in code behind as follows:
// Code disables caching by browser. Hence the back browser button
// grayed out and could not causes the Page_Load event to fire 
Response.Cache.SetCacheability(HttpCacheability.NoCache);
Response.Cache.SetExpires(DateTime.UtcNow.AddHours(-1));
Response.Cache.SetNoStore();


您可以将类似的东西添加为aspx格式:


You can add somethin similar in form aspx if you want to place it there:

<meta http-equiv="Cache-Control" content="no-cache">
<meta http-equiv="Pragma" content="no-cache">
<meta http-equiv="Expires" content="0"></meta></meta></meta>


这篇关于注销后如何使用后退按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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