• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1764
  • Last Modified:

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

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
reignsupreme
Asked:
reignsupreme
  • 2
  • 2
1 Solution
 
harwantgrewalCommented:
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
 
reignsupremeAuthor Commented:
Please send me the full code using www.yahoo as the example (beginner).
0
 
harwantgrewalCommented:
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
 
reignsupremeAuthor Commented:
Thank you!
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now