window.showModalDialog and PostBack

Discussion in 'ASP .Net' started by Henry Johnson, Jun 29, 2004.

  1. 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!
     
    Henry Johnson, Jun 29, 2004
    #1
    1. Advertising

  2. Henry Johnson

    bruce barker Guest

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

    -- bruce (sqlwork.com)


    "Henry Johnson" <> wrote in message
    news:OeqE%23%...
    > 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!
    >
    >
    >
     
    bruce barker, Jun 30, 2004
    #2
    1. Advertising

  3. Henry Johnson

    andrei Guest

    Hi Henry,

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

    <base target=_self>

    Andrei.


    "Henry Johnson" <> wrote in message
    news:OeqE##...
    > 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!
    >
    >
    >
     
    andrei, Jun 30, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jinx
    Replies:
    1
    Views:
    9,405
    CodeLife
    Jan 21, 2008
  2. MikeB
    Replies:
    1
    Views:
    770
    xcasalsv
    Dec 30, 2011
  3. kurt sune
    Replies:
    2
    Views:
    7,530
    imransyed63
    Aug 19, 2008
  4. Gilles T.
    Replies:
    1
    Views:
    191
    Jim Ley
    Jan 18, 2004
  5. Jonathan
    Replies:
    0
    Views:
    215
    Jonathan
    Jul 19, 2004
Loading...

Share This Page