views:

82

answers:

1

Hi folks:

I get one page inside frame which intends to redirect users to another web site. However, only the the page inside the frame get changed to another web site.

What kind of measure can I use to redirect whole doucment to another web site?

Thank you!

+1  A: 

If we speak for the redirect of asp.net, Response.Redirect can't achieve it.

Work around with this code:

ClientScript.RegisterStartupScript(this.GetType(), "scriptid", "window.parent.location.href='redirectpage.aspx'", true);

at code behind to redirect a new page at the main page.

If we talk for javascript use

top.location.href = "redirect.aspx" ;

reference: asp.net forum, Stack Over Flow

Hope it helps.

Aristos