Redirect to new page on parent window from iframe after ASP.NET PostBack
I have a simple ASP.NET web form on a page, which is contained in an iframe
on another page.
After this form has been submitted, I want the parent page, w开发者_如何学Gohich contains the iframe
, to be redirected to a particular URL.
How can I do this?
I've tried:
window.opener.location.href='www.domain.com'
But window.opener
returns a null
value. I think this is to do with the PostBack.
Any help much appreciated!
Try to use the window.parent object (window.opener.location.href) instead to accomplish this task.
精彩评论