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.
I remember I’ve solved it once ..
I think that the solution is to add a
< base target=_self>
inside the Head
Hey Alex,
base target=_self will work only for postback (form tag), not for window.location.href = ‘….’;
Oh .. yeah .
I guess you’re right .
And I suppose you can’t /don’t want to submit the page ..
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 ?
Alex – nope, I just want to reload the page (although postback-ing will work)
Shimon – refresh the modal screen.
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 ?