asp.net中的IE6回发 [英] IE6 postback in asp.net

查看:82
本文介绍了asp.net中的IE6回发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个页面,其中包含一个用户控件,而这只是一个个性化的下拉列表.我为每个项目分配属性onClick=__doPostBack('actrl',0).

I have a page that contains a user control that is just a personalized dropdown list . I assign to each item the attribute onClick=__doPostBack('actrl',0).

当我单击页面回发正常时,我得到了预期的结果.但是在IE6中,我的页面不会更改为从服务器加载的新值.

when I click the page postback fine and I got the expected results. However in IE6 my page doesn't change to the new values loaded from the server.

奇怪的是,当我转移+单击链接时,页面会重新加载所有更改.

The weird thing is that when I shift + click on the link The page reload fine with all changes.

我试图禁用页面上的缓存,但是没有运气.

I tried to disable caching on the page but no luck.

使用所有这些代码

Response.CacheControl = "no-cache"
Response.AddHeader("Pragma", "no-cache")
Response.Expires = -1
Response.Cache.SetExpires(DateTime.UtcNow.AddMinutes(-1))
Response.Cache.SetCacheability(HttpCacheability.NoCache)
Page.Response.Cache.SetExpires(DateTime.Now.AddDays(-30))
Page.Response.Cache.SetCacheability(HttpCacheability.NoCache)
Page.Response.Cache.SetNoServerCaching()
Page.Response.Cache.SetNoStore()
Response.Cache.SetNoStore()

此外,当我调试应用程序时,我可以看到要呈现的生成的html是正确的,但未呈现.

Also when I debug the application I can see that the generated html to be rendered is correct, but it is not rendered.

仅在IE6中会发生此问题.

This problem happens only in IE6.

推荐答案

这是已知的带有神奇HTTP获取请求的IE6错误(#223).

This is a known IE6 bug (#223) with magical HTTP get requests.

在此处查看错误: http://webbugtrack.blogspot. com/2007/09/bug-223-magical-http-get-requests-in.html

当内联事件处理程序导致IE6中的页面更改时,就会发生这种情况.

It happens when an inline event handler causes a page change in IE6.

这篇关于asp.net中的IE6回发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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