2

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.

Vinod
  • 31,933
  • 35
  • 96
  • 119

3 Answers3

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

redsquare
  • 78,161
  • 20
  • 151
  • 159
  • If you have control of the modal page (url.aspx) then why not turn caching off at the page instead of this not-so-elegant hack. Use @OutputCache directive <%@ OutputCache Duration="0" Location="None" VaryByParam="none" %>, or call Response.Cache.SetCacheability(HttpCacheability.NoCache); – Robert Paulson Jan 31 '09 at 05:54
1

Apply following directive in the InPage of the form:

<%@ OutputCache Location="None" %>
Rob Hruska
  • 118,520
  • 32
  • 167
  • 192
0

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

scunliffe
  • 62,582
  • 25
  • 126
  • 161