Solved

ASP.NET response.redirect to another server within an iframe and target the parent window

Posted on 2008-10-15
4
1,725 Views
Last Modified: 2012-05-05
I'd like to use response.redirect to target the parent window and redirect to a different website.  How should I do this using vb.net?

Thanks in advance.
0
Comment
Question by:reignsupreme
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 5

Expert Comment

by:harwantgrewal
ID: 22726627
With iFrame you have to use javascript to redirect on the parent window.

self.parent.href='NEW URL';

and you can do this in your code behind by registring client script

Harry
0
 

Author Comment

by:reignsupreme
ID: 22726775
Please send me the full code using www.yahoo as the example (beginner).
0
 
LVL 5

Accepted Solution

by:
harwantgrewal earned 500 total points
ID: 22726894
Hi If you can convert to VB :)
Give a try if you couldn't I will try to give you VB code
Below is the code where you want to write Response.Redirect...
this.ClientScript.RegisterClientScriptBlock(this.GetType(), "Redirect", "self.parent.href='http://www.yahoo.com';", true);

Open in new window

0
 

Author Closing Comment

by:reignsupreme
ID: 31506536
Thank you!
0

Featured Post

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Using Quotation Marks in PHP This question (http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/PHP/Q_28217211.html) seems to come up a lot for developers who are new to PHP.  And it got me thinking, "How can we explain the rule…
Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question