使用C#代码实现IE后退按钮 [英] Implementing IE back button using C# code

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

问题描述

我想知道如何在IE中实现Back功能?它如何记住控件的值及其位置?
我正在开发一个安全的网站,其中我使用以下方法禁用了页面缓存:
HttpContext.Current.Response.Cache.SetExpires(DateTime.Now。 AddDays(-2));
HttpContext.Current.Response.Cache.SetValidUntilExpires(false);
HttpContext.Current.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);
HttpContext.Current .Response.Cache.SetCacheability(HttpCacheability.NoCache);
HttpContext.Current.Response.Cache.SetNoStore();
HttpContext.Current.Response.Cache.SetNoServerCaching();
将记住所有控件,它们的值和位置。我在一些安全的网站上看到过这个功能,但我不知道如何实现它。我尝试使用 Request.UrlReferrer 但它只记得上一页。任何建议??

解决方案

欢迎任何建议..

I want to know how the Back functionality is implemented in IE? How does it remember the values of the controls and their positions?
I am developing a secure website wherein I have disabled the page cache using :
            HttpContext.Current.Response.Cache.SetExpires(DateTime.Now.AddDays(-2));
            HttpContext.Current.Response.Cache.SetValidUntilExpires(false);
            HttpContext.Current.Response.Cache.SetRevalidation(HttpCacheRevalidation.AllCaches);
            HttpContext.Current.Response.Cache.SetCacheability(HttpCacheability.NoCache);
            HttpContext.Current.Response.Cache.SetNoStore();
            HttpContext.Current.Response.Cache.SetNoServerCaching();

So when a user clicks on the back button, Page expired message comes up asking the user to refresh the page. Now if I want to implement a custom Back link/button on the page which will remember all the controls, their values and position. I have seen this functionality in some secure sites, but I dont know how to implement it. I tried using  Request.UrlReferrer but it remebers only the previous page. Any advice??

解决方案

Any suggestion is welcomed..


这篇关于使用C#代码实现IE后退按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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