Asp.net window.open弹出子窗体,刷新主窗体
2011-07-19 11:00
453 查看
首先,打开子窗体的方法,从后台打开
Response.Write("<script>window.open('××.aspx',','resizable,status, width=500,height=500,none,left=300,top=250,dependent=1');</script");
然后再在打开的窗体,也就是xx.aspx子窗体的按钮事件中添加链接:
Response.Write("<script>alert('添加成功');window.opener.location.replace(opener.location);window.close();</script>");
就可以回来父窗体。
说明:这里的主要返回的方法是window.opener.location.replace(opener.location);,返回的窗体就是opener.location,还可以指定任何窗体 名称,如window.opener.location.replace(a.aspx);,这样你就会回来 a.aspx页面并刷新 a.aspx页面
Response.Write("<script>window.open('××.aspx',','resizable,status, width=500,height=500,none,left=300,top=250,dependent=1');</script");
然后再在打开的窗体,也就是xx.aspx子窗体的按钮事件中添加链接:
Response.Write("<script>alert('添加成功');window.opener.location.replace(opener.location);window.close();</script>");
就可以回来父窗体。
说明:这里的主要返回的方法是window.opener.location.replace(opener.location);,返回的窗体就是opener.location,还可以指定任何窗体 名称,如window.opener.location.replace(a.aspx);,这样你就会回来 a.aspx页面并刷新 a.aspx页面
相关文章推荐
- asp.net中利用showModalDialog弹出模态窗体后刷新父窗体
- ASP.NET 弹出的窗体关闭后刷新上级窗体
- asp.net 中为什么在showModalDialog弹出的窗体 用html 控件 刷新不了页面。而用服务器端控件 写C#代码可以刷新页面。但是用服务器端刷新页面不好。
- ASP.net中防止弹出窗体中,开起两个一样的新子窗体
- [ASP.NET]如何点击按钮弹出新窗口,输入数据后返回并刷新页面?(C#代码)
- [Asp.Net]点击菜单导航栏 弹出的窗体显示到TBACONTORL中
- Asp.Net弹出窗体
- asp.net AJAX 定期刷新页面,然后,在 Timer 的事件中弹出窗口
- asp.net和php中用window.open打开的窗口session丢失的解决办法
- ASP.NET1.0/2.0里用DIV层元素弹出窗体
- asp.net AJAX 定期刷新页面,然后,在 Timer 的事件中弹出窗口
- asp.net AJAX 定期刷新页面,然后,在 Timer 的事件中弹出窗口
- 打印页面的一部分 asp c# asp.net js window.open
- Asp.net实现弹出窗口提示,又防止刷新被重复提交的方法
- ASP.NET页面使用JS弹出窗体
- JS窗口问题处理:使弹出窗口保持前端显示的几种方法,及window窗体对象open()和showModalDialog()用法
- asp.net 关闭自动刷新父窗体及各种弹窗汇总
- asp.net 中点击button弹出模式对话框,选择值后返回到页面中(window.showModalDialog实现)
- asp.net和php中用window.open打开的窗口session丢失的解决办法
- Asp.net中,从弹出窗体取选择值(转)