How to Pass values between from a popup page aspx & a normal page aspx

Discussion in 'ASP .Net' started by Marco Antonio Montalvo Durán, Jan 23, 2004.

  1. hi
    for example, I have a page 'register.aspx' and open a second page
    'popup.aspx', what I want to do is to pass the control and values obtained
    in 'popup.aspx' to 'register.aspx', somebody help!!!
    thanks
    Marco Antonio Montalvo Durán, Jan 23, 2004
    #1
    1. Advertising

  2. Sounds like you'll be needing to use some client side javascript.
    You can open a new window using javascript such as this:
    a=window.open('MyPage.aspx','_new')
    There are all kinds of options for setting window properties such as window
    size and toolbar visibility.
    Here's more info:
    http://msdn.microsoft.com/workshop/author/dhtml/reference/methods/open_0.asp

    From that new window you can reference the original parent window with
    this javascript reference:

    Here's an example:
    window.opener.document.form1.mytextbox.value = 'whatever';

    Here's more info:
    http://www.mozilla.org/docs/dom/domref/dom_window_ref77.html

    --
    I hope this helps,
    Steve C. Orr, MCSD
    http://Steve.Orr.net
    Hire top-notch developers at http://www.able-consulting.com



    "Marco Antonio Montalvo Durán" <> wrote in message
    news:%...
    > hi
    > for example, I have a page 'register.aspx' and open a second page
    > 'popup.aspx', what I want to do is to pass the control and values obtained
    > in 'popup.aspx' to 'register.aspx', somebody help!!!
    > thanks
    >
    >
    Steve C. Orr [MVP, MCSD], Jan 23, 2004
    #2
    1. Advertising

  3. Marco Antonio Montalvo Durán

    Matt Morris Guest

    I recently had to do the same thing. You definately need to use client side
    script. In my case, I used the window.open method to display the dialog,
    size it and configure it. Then in my dialog, when dismissed, I implemented a
    method that used the RegisterClientScriptBlock to dismiss the dialog as well
    as update the page that invoked the dialog in the first place. I wired up a
    method to the ServerChange event of the first page to automatically post
    back the page after the dialog was dismissed. It worked out great.

    Here's the dec for the method that dismisses the dialog and comminucates
    with the page via client side script.

    Public Sub SaveAndCloseDialog(ByVal formName as string, ByVal
    controlNameToSaveTo as String, ByVal dataToSave as string, ByVal submitForm
    as Boolean)

    "Marco Antonio Montalvo Durán" <> wrote in message
    news:%...
    > hi
    > for example, I have a page 'register.aspx' and open a second page
    > 'popup.aspx', what I want to do is to pass the control and values obtained
    > in 'popup.aspx' to 'register.aspx', somebody help!!!
    > thanks
    >
    >
    >
    Matt Morris, Jan 23, 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. VB Programmer
    Replies:
    5
    Views:
    2,511
    Jon Davis
    May 1, 2004
  2. =?Utf-8?B?U3VtYQ==?=

    Differentiating a normal window from a popup window.

    =?Utf-8?B?U3VtYQ==?=, Feb 28, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    454
    =?Utf-8?B?U3VtYQ==?=
    Feb 28, 2005
  3. blufox
    Replies:
    2
    Views:
    538
  4. Jens Peter Hansen
    Replies:
    7
    Views:
    499
    Randy Webb
    Jun 19, 2004
  5. Replies:
    2
    Views:
    447
Loading...

Share This Page