Can you refresh a form displayed via showmodaldialog method

G

Guest

Haven't been able to find a clear answer to this...
I am building an asp.net application and trying to enforce some work flow by
displaying a form via the showmodaldialog method. I can get the form to
display, etc. But I want to refresh the content of the form displayed in the
dialog window without navigating away from the form. For example... the
showdialog method opens up a record to be edited. After editing when the
save(submit) button is clicked I want to refresh the same page with a message
at the bottom that the record was saved. Currently the record saves but the
inline confirmation message does not display because the dialog form does not
refresh... So my question:
Can the content of the modal dialog be refreshed without navigating away
from the inital page?
 
I

intrader

Haven't been able to find a clear answer to this...
I am building an asp.net application and trying to enforce some work flow by
displaying a form via the showmodaldialog method. I can get the form to
display, etc. But I want to refresh the content of the form displayed in the
dialog window without navigating away from the form. For example... the
showdialog method opens up a record to be edited. After editing when the
save(submit) button is clicked I want to refresh the same page with a message
at the bottom that the record was saved. Currently the record saves but the
inline confirmation message does not display because the dialog form does not
refresh... So my question:
Can the content of the modal dialog be refreshed without navigating away
from the inital page?
You should be able to change the DOM in the dialog once you locate the
window.document reference.
 
B

Bruce Barker

for asp.net postbacks to work in a modal dialog, you need to host them in a
frame set

-- bruce (sqlwork.com)
 
E

Eliyahu Goldin

Putting <base target="_self"> in the <head> section of the page will do the
trick. No frames are necessary.

Eliyahu
 
G

Guest

All,
Thanks for the replys, I have tired both suggested solutions but neither
actually works the way I want it to. They both work if I navigate away from
the page but not if I am actually changing content on the page (I have also
tried the no cache suggested in the duplicate string). For example from
page1 I launch another window (page2) using the showmodaldialog method. On
page2 there is a button and a panel the panel starts off visible = false.
When the button is clicked the event handler sets the panels visible property
to true. If I open page 2 directly everthing works. If I open using the
showmodaldialog method. The panel will not open.
Tom M.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top