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

  • Thread starter Thread starter Oney
  • Start date Start date
O

Oney

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 said:
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/
 
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!
***************************
 
Back
Top