What's hot ? (and I mean really ...) - scroll down for more
1).  Code Templating - advanced usage of delegates & generics: my slides & demos are available for download! CodeProject article is also available.

2).  My series "TDD in the eyes of a simpleminded" is in progress(including code!): preface, part1, part2, Q&A 1, Manual Stub .vs. Mock Stub

3).  TDD Workshop: SeeCompass v0.1 and v0.2 are out.
# Wednesday, April 26, 2006

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.

Thursday, April 27, 2006 1:51:57 AM (Jerusalem Standard Time, UTC+02:00)
I remember I've solved it once ..
I think that the solution is to add a

< base target=_self>

inside the Head
Alex
Thursday, April 27, 2006 8:52:43 AM (Jerusalem Standard Time, UTC+02:00)

Hey Alex,
base target=_self will work only for postback (form tag), not for window.location.href = '....';
Thursday, April 27, 2006 10:50:43 PM (Jerusalem Standard Time, UTC+02:00)
Oh .. yeah .
I guess you're right .
And I suppose you can't /don't want to submit the page ..
Tuesday, May 02, 2006 12:07:09 AM (Jerusalem Standard Time, UTC+02:00)
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 ?
Shimon Krokhmal
Tuesday, May 02, 2006 8:44:15 AM (Jerusalem Standard Time, UTC+02:00)
Alex - nope, I just want to reload the page (although postback-ing will work)
Shimon - refresh the modal screen.
Thursday, May 04, 2006 9:43:58 PM (Jerusalem Standard Time, UTC+02:00)
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 ?
Shimon Krokhmal
Comments are closed.