showModalDialog 结束后如何刷新调用页面 我的一个框架页面,调用showModalDialog 实现纪录的添加。添加结束后如何刷新调用页面? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 window.showModalDialog ()window.location.reload() 不用刷新,参看下面的代码:string strScript = "<script>\r\n"; strScript+="window.parent.returnValue='"+this.TBoxDm.Text+"'\r\n"; strScript+="window.parent.close()\r\n"; strScript+="</script>\r\n"; if (!IsClientScriptBlockRegistered("clientScript")) RegisterClientScriptBlock("clientScript",strScript);直接把要的值当作父业面的返回值,再关闭它自己,这样父页面就有调用的结果了-------------------------------------------------------------------------.Net技术讨论群14272327,欢迎爱好c#和asp.net的同志加入~队伍正在不断壮大中... private void btnOk_Click(object sender, System.EventArgs e){ //Link(); RefreshPage();}private void RefreshPage(){ string script="<script>window.opener.location.href=window.opener.location.href;window.opener=null;window.close();</script>"; this.RegisterClientScriptBlock("meng",script);} document.location=document.location; 提示 window.opener.location 为空或不是对象 按 wb000wb(我本将心向明月,奈何明月照沟渠。)的方法解决了。多谢各位。 window.opener.location = a.aspx wb000wb(我本将心向明月,奈何明月照沟渠。)的代码是需要写在打开弹出窗口的Response.Write("XXXX");中的!!!!!方法可行,解决了我的问题。收藏此帖,并表示感谢! 关于gridview template动态添加控件的问题 在线= 求一个鼠标闲置程序 SqlDataSource连接SQLSERVER 2000测试连接出错 datagrid简单显示问题求助 Datalist的问题 一个javascript使用XML,XSL转换问题 TextChanged事件怎么响应? XML数据绑定datagrid的分页问题(上次是我没问清楚:) 我的数据加不进数据库.各位老大帮我看看,急救 将DATAGRID一行值赋给数组时,这样的对空值的判断是否正确?如果不是,请问要如何判断? 怎么搭建wap站点?配置 客户端控件作为服务器端运行?
window.location.reload()
string strScript = "<script>\r\n";
strScript+="window.parent.returnValue='"+this.TBoxDm.Text+"'\r\n";
strScript+="window.parent.close()\r\n";
strScript+="</script>\r\n";
if (!IsClientScriptBlockRegistered("clientScript"))
RegisterClientScriptBlock("clientScript",strScript);直接把要的值当作父业面的返回值,再关闭它自己,这样父页面就有调用的结果了-------------------------------------------------------------------------
.Net技术讨论群14272327,欢迎爱好c#和asp.net的同志加入~队伍正在不断壮大中...
{
//Link();
RefreshPage();
}
private void RefreshPage()
{
string script="<script>window.opener.location.href=window.opener.location.href;window.opener=null;window.close();</script>";
this.RegisterClientScriptBlock("meng",script);
}
多谢各位。