Open a child page and return value to the parent page in ASP.NET

Discussion in 'ASP .Net' started by rsht, May 25, 2009.

  1. rsht

    rsht Guest

    My special requirement is to do more in the child page, such as
    redirect to another page to get value to update the original parent
    page.

    By using showModalDialog to open the child page (should call it a
    dialogue box), the child page opens ANOTHER page when
    response.redirect is executed - this is not what I want. So, I wish to
    open a normal window for the child so that I can do more.

    Anyone can give me some helps? Thanks
     
    rsht, May 25, 2009
    #1
    1. Advertising

  2. rsht

    rsht Guest


    > By using showModalDialog to open the child page (should call it a
    > dialogue box), the child page opens ANOTHER page when
    > response.redirect is executed

    Sorry, "ANOTHER" page means ANOTHER WINDOW here.
     
    rsht, May 25, 2009
    #2
    1. Advertising

  3. On May 25, 4:02 am, rsht <> wrote:
    > > By using showModalDialog to open the child page (should call it a
    > > dialogue box), the child page opens ANOTHER page when
    > > response.redirect is executed

    >
    > Sorry, "ANOTHER" page means ANOTHER WINDOW here.


    Call js from the child page

    window.opener.document.getElementById("HiddenField1").value = "xxx";

    where HiddenField1 is a Client ID of Hidden Field.
     
    Alexey Smirnov, May 25, 2009
    #3
  4. rsht

    rsht Guest

    On May 25, 5:39 pm, Alexey Smirnov <> wrote:
    > On May 25, 4:02 am, rsht <> wrote:
    >
    > > > By using showModalDialog to open the child page (should call it a
    > > > dialogue box), the child page opens ANOTHER page when
    > > > response.redirect is executed

    >
    > > Sorry, "ANOTHER" page means ANOTHER WINDOW here.

    >
    > Call js from the child page
    >
    > window.opener.document.getElementById("HiddenField1").value = "xxx";
    >
    > where HiddenField1 is a Client ID of Hidden Field.


    Many thanks Alexey!

    I also worked out the same solution:
    1. in the parent window/page, use window.open to bring out the child
    page;
    2. use the same method as yours to set the value in the parent page,
    then window.close().
     
    rsht, May 26, 2009
    #4
  5. On May 26, 3:03 am, rsht <> wrote:
    > On May 25, 5:39 pm, Alexey Smirnov <> wrote:
    >
    > > On May 25, 4:02 am, rsht <> wrote:

    >
    > > > > By using showModalDialog to open the child page (should call it a
    > > > > dialogue box), the child page opens ANOTHER page when
    > > > > response.redirect is executed

    >
    > > > Sorry, "ANOTHER" page means ANOTHER WINDOW here.

    >
    > > Call js from the child page

    >
    > > window.opener.document.getElementById("HiddenField1").value = "xxx";

    >
    > > where HiddenField1 is a Client ID of Hidden Field.

    >
    > Many thanks Alexey!
    >
    > I also worked out the same solution:
    > 1. in the parent window/page, use window.open to bring out the child
    > page;
    > 2. use the same method as yours to set the value in the parent page,
    > then window.close().


    great!
     
    Alexey Smirnov, May 26, 2009
    #5
  6. rsht

    shawpnendu

    Joined:
    Mar 4, 2009
    Messages:
    17
    Location:
    Dhaka, Bangladesh
    HI YOU CAN READ THE BELOW POST:
    shawpnendu.blogspot.com/2009/02/automaticaly-refresh-parent-window.html

    HOPE IT WILL HELP YOU.
     
    shawpnendu, May 26, 2009
    #6
    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. davout
    Replies:
    0
    Views:
    552
    davout
    Apr 18, 2004
  2. leon
    Replies:
    0
    Views:
    429
  3. Jeff Rodriguez
    Replies:
    23
    Views:
    1,131
    David Schwartz
    Dec 9, 2003
  4. Noel Dolan
    Replies:
    0
    Views:
    236
    Noel Dolan
    Jul 18, 2004
  5. Bitswapper
    Replies:
    5
    Views:
    149
    Prasad, Ramit
    Aug 27, 2013
Loading...

Share This Page