window.showModalDialog Page Load not being executed

限于喜欢 提交于 2019-12-12 17:37:36

问题


I am actually loading a page as a modal dialog box as window.showModalDialog("url.aspx"). The first time the modal dialog is poped up the page load event gets called. When i close it and call the same again, the Control does not come to the PageLoad. Instead the page pops up with the previous values in all its controls.

I actually want the PageLoad to be triggered everytime the modal dialog pops up.


回答1:


ok....you do know showModalDialog is an proprietary IE only feature? As long as you are aware of this then I think you may need to add a unique querystring value to the url that you are using to avoid ie showing the cached version. So generate a random number and append it to the url e.g url.aspx?rnd=12237827348273. This should bust the cache and make a fresh request




回答2:


Apply following directive in the InPage of the form:

<%@ OutputCache Location="None" %>



回答3:


Firefox 3 supports https://developer.mozilla.org/en/DOM/window.showModalDialog



来源:https://stackoverflow.com/questions/186633/window-showmodaldialog-page-load-not-being-executed

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!