问题描述
是否有人在 Google Chrome 中对 Page_Load 执行两次有任何问题?这是一个简短的问题,我不知道还能解释什么......
Does anyone have any problems with Page_Load being executed twice in Google Chrome?It's a short question, i do not know what else to explain...
我有一个简单的 asp.net 页面,在 Firefox 和 IE 中一切正常.但在 Chrome 中,Page_Load 被触发两次......
I have a simple asp.net page and in Firefox and IE all it's working fine.But in Chrome the Page_Load is fired twice...
有人知道为什么吗?
后来- 奇怪的是我有 4 个中继器...绑定了随机值.随机方法被触发两次(因为页面加载了两次)但转发器采用初始值......所以,在渲染步骤之后,第二次回发以某种方式被提升.
Later- what is strange is that i have 4 repeaters... binded with random values. The random methods are twice fired (because of page loaded twice) but the repeaters takes the INITIALLY values...so, the 2nd post back is somehow raised after the rendering step.
第三次它只在刷新时发生!
3rd edit: It happens ONLY at the refresh!
解决方案(就我而言): img src 为空,这就是原因
Solution (in my case): There was an empty img src, and that was the cause
推荐答案
如果页面包含没有 src 属性的 img 标签(或 src 为空等),我会在 IE 中发现同样的问题.不确定 Chrome 是否也做同样的事情,但值得检查,对吗?
I notice this same issue in IE if the page contains img tags that don't have a src attribute (or the src is empty, etc). Not sure if Chrome does the same thing, but worth checking, right?
这篇关于页面在谷歌浏览器中加载两次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!