Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Reference to another instance of page from a page (URGENT!!!)

Reply
Thread Tools

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

 
 
Oney
Guest
Posts: n/a
 
      01-27-2005
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!
 
Reply With Quote
 
 
 
 
=?ISO-8859-1?Q?Anders_Nor=E5s?=
Guest
Posts: n/a
 
      01-27-2005
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/
 
Reply With Quote
 
 
 
 
=?Utf-8?B?Q293Ym95IChHcmVnb3J5IEEuIEJlYW1lcikgLSBNVlA=?=
Guest
Posts: n/a
 
      01-27-2005
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!
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Don't understand behavior; instance form a class in another class'instance Martin P. Hellwig Python 1 03-26-2010 12:06 AM
String constant reference to another class instance variable Mikkel Kroman Ruby 3 02-08-2010 05:56 PM
instance method adding another instance method to the class Raj Singh Ruby 2 05-29-2008 10:09 PM
"Object reference not set to an instance of an object" Weird thing happens with reference a link nguyentrongkha@gmail.com ASP .Net 1 09-20-2007 09:46 PM
Custom Taglib problems - instead of a single instance per page, I have a single instance per application. chris brat Java 1 05-10-2006 11:16 AM



Advertisments