Reference to another instance of page from a page (URGENT!!!)

Discussion in 'ASP .Net' started by Oney, Jan 27, 2005.

  1. Oney

    Oney Guest

    I have 3 pages, x.aspx,y.aspx,z.aspx
    x.aspx opens y.aspx as popup then y.aspx opens z.aspx and closes
    itself. when z.aspx is opened x.aspx page must be redirect another
    page. So In my opinion, I must refence to x.aspx from z.aspx to
    redirect another page. how can I do that. I waste too much time. Pls
    help!
     
    Oney, Jan 27, 2005
    #1
    1. Advertising

  2. Oney wrote:
    > I have 3 pages, x.aspx,y.aspx,z.aspx
    > x.aspx opens y.aspx as popup then y.aspx opens z.aspx and closes
    > itself. when z.aspx is opened x.aspx page must be redirect another
    > page. So In my opinion, I must refence to x.aspx from z.aspx to
    > redirect another page.


    You can do this with client side scripting. To redirect the original
    browser window to another url from the pop up window when "z.aspx" is
    loaded you can add the following JavaScript code to "z.aspx":

    onload=function() {
    if (window.opener) {
    window.opener.location.replace("abc.aspx"); // Replace abc.aspx
    with your real URL.
    } else alert("z.aspx was not opened as a pop up!");
    }

    Anders NorĂ¥s
    http://dotnetjunkies.com/weblog/anoras/
     
    =?ISO-8859-1?Q?Anders_Nor=E5s?=, Jan 27, 2005
    #2
    1. Advertising

  3. JavaScript is your best shot in your scenario. Via JavaScript, you can
    control window instances or frame instances and force redirection to another
    page.

    In other scenarios, you can reference a page class from another page, but it
    is better to refactor to a business class in these instances than use Page
    objects as objects to feed other pages.

    ---

    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    ***************************
    Think Outside the Box!
    ***************************

    "Oney" wrote:

    > I have 3 pages, x.aspx,y.aspx,z.aspx
    > x.aspx opens y.aspx as popup then y.aspx opens z.aspx and closes
    > itself. when z.aspx is opened x.aspx page must be redirect another
    > page. So In my opinion, I must refence to x.aspx from z.aspx to
    > redirect another page. how can I do that. I waste too much time. Pls
    > help!
    >
     
    =?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBN, Jan 27, 2005
    #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. Moe Sizlak
    Replies:
    9
    Views:
    4,091
    Dan Williams
    Sep 1, 2004
  2. Replies:
    1
    Views:
    518
    Mark Rae [MVP]
    Sep 20, 2007
  3. Martin P. Hellwig
    Replies:
    1
    Views:
    389
    Martin P. Hellwig
    Mar 26, 2010
  4. Raj Singh
    Replies:
    2
    Views:
    218
    Rick DeNatale
    May 29, 2008
  5. Mikkel Kroman
    Replies:
    3
    Views:
    145
    Brian Candler
    Feb 8, 2010
Loading...

Share This Page