如何击球的时候浏览器的后退按钮刷新ASP .NET MVC页 [英] How to refresh ASP .NET MVC page when hitting browser back button

查看:504
本文介绍了如何击球的时候浏览器的后退按钮刷新ASP .NET MVC页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我发现,当我点击任何ASP .NET MVC页没有浏览器后退按钮发生,页面不会被更新。而只有当你按下F5它只会更新。

I just found that when I click browser back button on any ASP .NET MVC page nothing happens and page is not going be updated. And only if you click F5 it will be updated only.

这是我做的页面的DOM的一些变化,即添加表行的主要问题选择单选按钮等,当我回到页面通过点击浏览器后退按钮我也看不出有什么变化。

The main problem that I do some changes of DOM of the page i.e. add table rows select radio-buttons and etc and when I go back to page by hitting browser back button I have see no changes.

如何可以解决的ASP .NET MVC 5?

How it can be resolved for ASP .NET MVC 5?

感谢任何线索......

Thank for any clue...

P.S。我已阅读的http:// forums.asp.net/t/1304752.aspx?how+to+refresh+page+when+hitting+back+button 但它并不能帮助...

P.S. I have read http://forums.asp.net/t/1304752.aspx?how+to+refresh+page+when+hitting+back+button but it does not help...

推荐答案

下面是一个妥善的解决办法<一href=\"http://dotscrapbook.word$p$pss.com/2011/02/02/handling-a-browser-back-button-$p$pss-with-mvc/\">http://dotscrapbook.word$p$pss.com/2011/02/02/handling-a-browser-back-button-$p$pss-with-mvc/.

Here is a proper solution http://dotscrapbook.wordpress.com/2011/02/02/handling-a-browser-back-button-press-with-mvc/.

[HttpGet]
[OutputCache(NoStore = true, Duration = 0, VaryByParam = "None")] 
public ActionResult MyView()
{
  ...
}

这篇关于如何击球的时候浏览器的后退按钮刷新ASP .NET MVC页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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