English 中文(简体)
• 如何从儿童网页上更新2.0
原标题:How to refresh parent page from child page in asp.net 2.0
  • 时间:2009-10-08 06:15:37
  •  标签:

I have a page showing all products in a gridview. I have a link in the page clicking on it opens a modal window. In the modal window there is a form to enter product and save. When I fill the form and save product I need to make the parent page to be refreshed so that the new product is listed in the gridview and a message will be shown in a label in the modal window. I need to refresh the product list page without closing the modal window. How to do it?

请提供帮助。

最佳回答

你可以用以下 Java文复读:

window.opener.location.reload(true);
问题回答
window.opener.location.reload(true);

<代码>true确保该网页从服务器上重载,而不是从浏览器上载。

只有在使用javascript的第一页开出第二页时,而不是在新窗口第一页上打开链接时,才会奏效——<条码>。 即使是在前一种情况下,如果两页都不是同一领域,那么Grea会拒绝错误。





相关问题
热门标签