CJ

The circle of life – ** .Net – Training – MOSS **

  • Past Post

  • Vistor Locations

Modal dialogs and browser caching

Posted by CJ on September 11, 2007

There seems to be quite a number of behavioural differences between window.open and window.showModalDialog.

 I was having an issue when opening a showModalDialog the page didn’t seem to be raising the page load event, but the window.open was working perfectly.

IE apparently caches modal forms so I needed to remove this default behaviour. I entered the following two lines in the page load event and all seems to be fine:

Response.Expires = 0;
Reponse.Cache.SetNoStore();

 I also always forget to place the following element in the <head> element to stop the .showModalDialog creating a new window instance.
<base target=”_self”>

Leave a Reply

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <pre> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>