You can add target="_top"html to the element <form>or redirect using javascript window.top.location = '/path'.
If you have multiple iframe pages, you can create a shared page, call her FrameRedirector.aspx. Put this code in the body:
<script type="text/javascript">
window.top.location = '<%=Server.UrlDecode(Request.QueryString["url"])%>';
</script>
Then replace the code Response.Redirectwith
string redirect = "/path/to/redirect.aspx?foo=bar";
Response.Redirect("~/FrameRedirector.aspx?url=" + Server.UrlEncode(redirect));
source
share