How to refresh a Modal Dialog window

In one of our screens we were required to refresh a Modal Dialog window in order to redraw the entire screen. Trying to refresh a Modal Dialog window will resolve in a new window with the same url.

A possible solution is to create a new “container” file (MyContainer.aspx) which will only have an IFrame with the “real” page(MyPage.aspx) in it as src; Your main page (MyMainPage.aspx) will open the “container” as Modal Dialog instead of the “real” page. The trick is that the IFrame can refresh itself so we’ve created a Modal Dialog which behaves as a normal window. if you need to set the Modal Dialog returnValue parameter you can call “top.returnValue=….” from the “real” page.


The downside of this solution is QueryString delegation – if you need to send a QueryString parameter(s) to your “real” page you will now have to pass it via the “container” file.

 

Oren Ellenbogen

 

6 thoughts on “How to refresh a Modal Dialog window

  1. I remember I’ve solved it once ..
    I think that the solution is to add a

    < base target=_self>

    inside the Head

  2. i didn’t get what you are trying to do ….

    are you trying to refresh the Modal Screen , or are you trying to refresh the page that called him ?

  3. i’ve got an answer for you…
    but i cant write a comment due to the HTML code restriction….

    how can i write an example of an HTML code ?

Comments are closed.