刷新从ASPX打开的ASPX页面. [英] Refresh a ASPX page opened from ASPX.

查看:91
本文介绍了刷新从ASPX打开的ASPX页面.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

这是我的问题:

我使用以下代码在新窗口中打开了ASPX页面.
"ClientScript.RegisterStartupScript(Me.GetType(),"OpenWin",< script> window.open(``XXX.aspx'',``new_Win'');</script>").
它将从父页面获取一些会话值,并显示在XXX.ASPX页面中.
如果在"XXX.aspx"实例已经运行(XXX.aspx页面已打开)的情况下更新父页面中的值,则"XXX.aspx"的页面加载不会触发.

1)当实例已经在运行时,如何刷新XXX.aspx页面内容?
2)是否可以使用ASP.NET关闭/刷新XXX.aspx窗口?

如果您有想法请告诉我.

谢谢
Kumar

Hi All,

Here is my problem:

I have opened an ASPX page in new window using the following code.
"ClientScript.RegisterStartupScript(Me.GetType(), "OpenWin", "<script>window.open(''XXX.aspx'',''new_Win'');</script>")".
Which will take some session values from parent page and display in XXX.ASPX page.
If I update the values in parent page when the "XXX.aspx" instance is already running (XXX.aspx page is already opened) then the page load of "XXX.aspx" is not firing.

1) How can i refresh the XXX.aspx page content when already an instance is running?
2) Is there any way to close/refresh the XXX.aspx window using ASP.NET?

Please let me know if you have idea.

Thanks
Kumar

推荐答案

要刷新,我经常在其中调用同一页面,就像您在默认"页面中那样:

To Refresh I use to call the same page I''m in it like if you are in the Default page then:

Response.Redirect("Default.aspx")


感谢您的宝贵时间.我已经通过另一种方式完成了此操作.以下是我的解决方案(可能对您有帮助)

当您要使用更新的值刷新页面时,通过添加动态查询字符串来更改URL.当请求的URL不相同时,页面将回发/加载.
Thanks all for your time. I have done this by an alternate way. The following is my solution (It may help u)

Change the URL by adding dynamic query string when you want to refresh the page with updated values. The page will post back/load when the URL is not same for request.


这篇关于刷新从ASPX打开的ASPX页面.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆