0

I have 3 different websites A, B, C. The iframe is on website A and points to website B.

A - a django website B and C- asp.net mvc websites

The redirect occurs on B when you click a button(submit), it performs an operation and then redirect to C, but unfortunately the redirect occurs inside the iframe. I want to redirect completely.

I tried return RedirectPermanent(url) inside my MVC Controller Redirect(url)

0

1 Answer 1

2

Did you try this:

window.top.location.href = "http://www.sitec.com";

Keep in mind the site you are redirecting to must abide by the "same origin policy" in order to work. same origin policy

Sign up to request clarification or add additional context in comments.

3 Comments

The redirect needs to be performed from the controller, not from javascript.
Ok perhaps this previous question will help you: stackoverflow.com/questions/8236016/…
@Zinov You must understand that the controller, or the whole server-side for that matter, has no idea that it is running in an iframe. You cannot force a client to do something if you aren't the client. Simple as that.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.