开发者

Redirect to new page on parent window from iframe after ASP.NET PostBack

开发者 https://www.devze.com 2023-04-02 07:15 出处:网络
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 b

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消