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?
 
Ad

Advertisements

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.
 
Ad

Advertisements

Joined
Aug 21, 2012
Messages
1
Reaction score
0
Simply if you want to refresh the Modal window by clicking a Button use form tag and use submit button to refresh it.

eg,

<form action="url" method="post">
<input type="submit" name="Refresh" value="Refresh Modal Window"/>
</form>

Thanks
Saikat
> Putting <base target="_self"> in the <head> section of the page will do the
> trick. No frames are necessary.
>
> Eliyahu
>
> "Bruce Barker" <[email protected]> wrote in message
> news:[email protected]
> > for asp.net postbacks to work in a modal dialog, you need to host them in
> a
> > frame set
> >
> > -- bruce (sqlwork.com)
> >
> >
> > "Tmajarov" <[email protected]> wrote in message
> > news:[email protected]
> > > 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?
> >
> >

>
>
>
[/QUOTE]
 

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

Top