Friday, March 16, 2012

ModalWindow not firing Page_Load.. please help

I have an aspx page that calls a modal dialog which loads another aspx page,
using javascript:
self.showModalDialog(\\target.aspx);

The first time i open the modal dialog, target.aspx's Page_Load runs fine.
But if I close the window and try and reopen it, the Page_Load is not
called, and a cached version
of the page is displayed. Only after i've closed and reopened the browser,
browsed to the original page and called the modal window does target.aspx's
Page_Load run again.

Why is this happening and what can i do to ensure Page_Load is always fired?

Any help is very appreciated,
ShadyThis is not a permanent solution because it involves client change, but have
you tried opening IE Tools -> Internet Options -> Settings and selecting
"Every visit to the page" and see if the problem repros.

--
- Shuvro
SDE, MSFT

This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm.

"Shady Azzam" <shadyazzam@.gmail.com> wrote in message
news:uh6ISzXgFHA.132@.TK2MSFTNGP10.phx.gbl...
>I have an aspx page that calls a modal dialog which loads another aspx
>page, using javascript:
> self.showModalDialog(\\target.aspx);
> The first time i open the modal dialog, target.aspx's Page_Load runs fine.
> But if I close the window and try and reopen it, the Page_Load is not
> called, and a cached version
> of the page is displayed. Only after i've closed and reopened the browser,
> browsed to the original page and called the modal window does
> target.aspx's Page_Load run again.
> Why is this happening and what can i do to ensure Page_Load is always
> fired?
> Any help is very appreciated,
> Shady
I actually prefer to turn page output caching off in the ASPX page ...
something like this:

<%@. OutputCache Duration="1" VaryByParam="*"%
Not sure if this is the very best way to do it, but it seems to work well --
better than telling 100's of users to change their Internet Options.

Wade

"Shuvro Mazumder [MSFT]" <shuvrom@.online.microsoft.com> wrote in message
news:eZG6vqZgFHA.3936@.TK2MSFTNGP10.phx.gbl...
> This is not a permanent solution because it involves client change, but
> have you tried opening IE Tools -> Internet Options -> Settings and
> selecting "Every visit to the page" and see if the problem repros.
> --
> - Shuvro
> SDE, MSFT
> This posting is provided "AS IS" with no warranties, and confers no
> rights. Use of included script samples are subject to the terms specified
> at http://www.microsoft.com/info/cpyright.htm.
>
> "Shady Azzam" <shadyazzam@.gmail.com> wrote in message
> news:uh6ISzXgFHA.132@.TK2MSFTNGP10.phx.gbl...
>>I have an aspx page that calls a modal dialog which loads another aspx
>>page, using javascript:
>> self.showModalDialog(\\target.aspx);
>>
>> The first time i open the modal dialog, target.aspx's Page_Load runs
>> fine. But if I close the window and try and reopen it, the Page_Load is
>> not called, and a cached version
>> of the page is displayed. Only after i've closed and reopened the
>> browser, browsed to the original page and called the modal window does
>> target.aspx's Page_Load run again.
>>
>> Why is this happening and what can i do to ensure Page_Load is always
>> fired?
>>
>> Any help is very appreciated,
>> Shady
>>

0 comments:

Post a Comment