Can anyone help? I am opening an aspx page (webform) as a dialog window
through javascript in response to a button click on a parent datagrid
buttoncolumn using the window.showmodal() javascript call.

The dialog webform is not hosted within an html frames page. The webform
works great and when a 'Save' button is clicked, I write the information
back to a DB (which works fine). I then send a javascript window.close to
the broswer in order to close the dialog. Again this seems to work fine.

Problem is when I open the dialog again, the page_load event is not fired as
though the webform that should appear in the dialog window has not been
unloaded (just hidden). Consequently, changes that were made in the previous
save are not displayed (the controls contain the old values!).

I have tried a me.dispose() call (also folowed by a gc.collect()) call after
the response.write("<script>window.close();</script>") statement in the
dialog webform but this makes no difference (at least it doesn't solve my
problem).

If I terminate the application and then reopen the dialog for the same
information my changes are as they should be.

Any suggestions would be gratefully received as I am really struggling with
this.

TIA
Chris.

RE: Problem with webform as dialog by DanielJin

DanielJin
Thu Jul 01 12:21:01 CDT 2004

showModalWindow has a nasty habit of caching. you need to turn off caching on the page to prevent that.

"Chris Watson" wrote:

> Can anyone help? I am opening an aspx page (webform) as a dialog window
> through javascript in response to a button click on a parent datagrid
> buttoncolumn using the window.showmodal() javascript call.
>
> The dialog webform is not hosted within an html frames page. The webform
> works great and when a 'Save' button is clicked, I write the information
> back to a DB (which works fine). I then send a javascript window.close to
> the broswer in order to close the dialog. Again this seems to work fine.
>
> Problem is when I open the dialog again, the page_load event is not fired as
> though the webform that should appear in the dialog window has not been
> unloaded (just hidden). Consequently, changes that were made in the previous
> save are not displayed (the controls contain the old values!).
>
> I have tried a me.dispose() call (also folowed by a gc.collect()) call after
> the response.write("<script>window.close();</script>") statement in the
> dialog webform but this makes no difference (at least it doesn't solve my
> problem).
>
> If I terminate the application and then reopen the dialog for the same
> information my changes are as they should be.
>
> Any suggestions would be gratefully received as I am really struggling with
> this.
>
> TIA
> Chris.
>
>
>
>

Re: Problem with webform as dialog by Chris

Chris
Thu Jul 01 13:08:37 CDT 2004

Thanks, that seems to have solved my problem - I appreciate the prompt
response.

"Daniel Jin" <DanielJin@discussions.microsoft.com> wrote in message
news:64EBDF9A-4F99-4B6D-B81E-F17819189DAB@microsoft.com...
> showModalWindow has a nasty habit of caching. you need to turn off
caching on the page to prevent that.
>
> "Chris Watson" wrote:
>
> > Can anyone help? I am opening an aspx page (webform) as a dialog window
> > through javascript in response to a button click on a parent datagrid
> > buttoncolumn using the window.showmodal() javascript call.
> >
> > The dialog webform is not hosted within an html frames page. The webform
> > works great and when a 'Save' button is clicked, I write the information
> > back to a DB (which works fine). I then send a javascript window.close
to
> > the broswer in order to close the dialog. Again this seems to work fine.
> >
> > Problem is when I open the dialog again, the page_load event is not
fired as
> > though the webform that should appear in the dialog window has not been
> > unloaded (just hidden). Consequently, changes that were made in the
previous
> > save are not displayed (the controls contain the old values!).
> >
> > I have tried a me.dispose() call (also folowed by a gc.collect()) call
after
> > the response.write("<script>window.close();</script>") statement in the
> > dialog webform but this makes no difference (at least it doesn't solve
my
> > problem).
> >
> > If I terminate the application and then reopen the dialog for the same
> > information my changes are as they should be.
> >
> > Any suggestions would be gratefully received as I am really struggling
with
> > this.
> >
> > TIA
> > Chris.
> >
> >
> >
> >