关闭弹出窗口并将父页面重定向到其他页面。 [英] Close Popup and redirect the parent page to some other page.
本文介绍了关闭弹出窗口并将父页面重定向到其他页面。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Hello guy's。
我有一个父页面,其中我有几个链接按钮。
点击其中一个按钮我打开一个弹出窗口其中包含一个包含产品列表的网格视图控件。
在网格视图中,我有一个编辑链接按钮。点击编辑我希望父页面重定向到EditProduct.aspx,产品ID作为查询字符串并关闭弹出窗口。
有人可以帮助我。
我是一个非常新的编码。
感谢您的帮助。
Hello guy''s.
I have a Parent page in which i have few link buttons.
On click of one of the button i open a pop window which contains a grid view control which has product list.
In grid view i have a edit link button. On click of Edit i want the parent page to redirect to EditProduct.aspx with Product ID as a query string and close the popup window.
Can some one help me.
I am a very new to coding.
Thanks for your help.
推荐答案
您可能需要调查window.parent [ ^ ]财产。假设弹出窗口实际上是一个具有更高z顺序的div,它使用iframe显示来自另一个页面的内容;这将允许您与父页面进行交互。
问候
Espen Harlinn
You may want to investigate the window.parent[^] property. Assuming that the popup is actually a div with a higher z-order displaying contents from another page using an iframe; this will allow you to interact with the "parent" page.
Regards
Espen Harlinn
如果您的弹出窗口是通过javascript,Espen Harlinn的解决方案应该有效。或者,您可以使用ASp.net Ajax控件工具包的模态弹出窗口,其中的按钮可用于触发回发或跨页回发。如果回发然后在按钮点击事件处理程序中你可以重定向到另一页。
祝你好运
Espen Harlinn''s solution should work if your popup is through a javascript. Alternatively you can use ASp.net Ajax control toolkit''s modal popup and a button in there can be used to trigger postback or crosspage postback. If postback then in the button click event handler you can redirect to another page.
Good luck
看看这个文章。您可以从中获取足够的信息以继续:关闭时通过AJAX(ASP.NET 2.0)对父页面进行部分更新儿童窗口 - 有条件地 [ ^ ]
返回时不需要回发,而是需要在这里导航。
Have a look at this article. You can get enough info from it to move on: Partial update of parent page via AJAX (ASP.NET 2.0) on close of a child window - conditionally[^]
Instead of a postback on return, you need to navigate here.
这篇关于关闭弹出窗口并将父页面重定向到其他页面。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文