Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


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

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

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 2000 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

Understanding Web Applications

Without even knowing it, most of us are using web applications on a daily basis. Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We often confuse these web applications tools for websites.  So, what is the difference?

Question has a verified solution.

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

Introduction HyperText Transfer Protocol ( or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
A Change in PHP Behavior with Session Write Short Circuit ( (Winter 2014)** With the release of PHP 5.6 the session handler changed in a way that many think should be considered a bug.  See the note …
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… provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.

705 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