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

Posted on 2008-10-15
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

Thanks in advance.
Question by:reignsupreme
  • 2
  • 2

Expert Comment

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


Author Comment

ID: 22726775
Please send me the full code using as the example (beginner).

Accepted Solution

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='';", true);

Open in new window


Author Closing Comment

ID: 31506536
Thank you!

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Sending E-mail ASP.Net 3 55
what technologies offer Authentication over Web Services? 4 103
Resolve Dependency Issues 4 41
Reset login password 4 25
New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
It’s a strangely common occurrence that when you send someone their login details for a system, they can’t get in. This article will help you understand why it happens, and what you can do about it.
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 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…

932 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

10 Experts available now in Live!

Get 1:1 Help Now