window.showModalDialog and PostBack

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Henry Johnson

    window.showModalDialog and PostBack

    I'm currently opening an aspx page (myModalASPX) as a dialog box from
    client-side script using window.showModa lDialog(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

    #2
    Re: window.showModa lDialog and PostBack

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

    -- bruce (sqlwork.com)


    "Henry Johnson" <okey@dokey.com > wrote in message
    news:OeqE%23%23 hXEHA.3888@TK2M SFTNGP10.phx.gb l...[color=blue]
    > I'm currently opening an aspx page (myModalASPX) as a dialog box from
    > client-side script using window.showModa lDialog(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[/color]
    it[color=blue]
    > to post back to the server - which subsequently renders the updated[/color]
    version[color=blue]
    > back to the original modal dialog box (and not to a new window)?
    >
    > Thanks!
    >
    >
    >[/color]


    Comment

    • andrei

      #3
      Re: window.showModa lDialog and PostBack

      Hi Henry,

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

      <base target=_self>

      Andrei.


      "Henry Johnson" <okey@dokey.com > wrote in message
      news:OeqE##hXEH A.3888@TK2MSFTN GP10.phx.gbl...[color=blue]
      > I'm currently opening an aspx page (myModalASPX) as a dialog box from
      > client-side script using window.showModa lDialog(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[/color]
      it[color=blue]
      > to post back to the server - which subsequently renders the updated[/color]
      version[color=blue]
      > back to the original modal dialog box (and not to a new window)?
      >
      > Thanks!
      >
      >
      >[/color]


      Comment

      Working...