window.showModalDialog and PostBack

H

Henry Johnson

I'm currently opening an aspx page (myModalASPX) as a dialog box from
client-side script using window.showModalDialog(blah blah blah).

The dialog opens as expected. Now I'm adding functionality to the dialog
box/aspx page that causes a postback. What currently happens is that after
the postback, myModalASPX page is rendered back to the client in a new
browser window - which gives me *two instances* of myModalASPX in the
client - one being in the original modal window and another that's in a
separate browser window. Not good.

What does it take to show an aspx page as a modal dialog box *and* enable it
to post back to the server - which subsequently renders the updated version
back to the original modal dialog box (and not to a new window)?

Thanks!
 
B

bruce barker

it must be contained in a frameset in the modal window.

-- bruce (sqlwork.com)
 
A

andrei

Hi Henry,

Just add the following in the <head> section of your aspx page:

<base target=_self>

Andrei.
 

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,764
Messages
2,569,567
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top