Solved

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

Posted on 2008-10-15
4
1,701 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
  • 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 to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction (All good things must come to an end (http://en.wikipedia.org/wiki/All_Good_Things...)) The original MySQL API (http://php.net/manual/en/book.mysql.php) has gone away, deprecated by PHP in Version 5.5, and removed from PHP in all curre…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
This video teaches viewers how to create their own website using cPanel and Wordpress. Tutorial walks users through how to set up their own domain name from tools like Domain Registrar, Hosting Account, and Wordpress. More specifically, the order in…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now