单个模式窗体的刷新问题当然很好解决了:
关闭子窗体同时刷新父窗体。
function reloadParent(flag){
var url=window.dialogArguments.location;
//模式窗体的路径
window.dialogArguments.location=url;
if(flag==1)
alert("修改成功!")
else if(flag==2)
alert("添加成功!")
else
alert("操作成功!");
this.close();
}
两个模式窗体的刷新问题:
找了好长时间没能解决这个问题,后来有个大牛帮了我,感觉挺好的,他的方法是先把当前的模式窗体全部关闭,然后再重新打开需要刷新的窗体,呵呵,不失为一种好的解决发法,跟需要的朋友分享一下。。。
Hst.Common.MessageBox.ResponseScript(Page, " window.dialogArguments.close();this.close();window.dialogArguments.dialogArguments.openWindow('AlterOrder.aspx',780,600);");
引用的类
public static void ResponseScript(System.Web.UI.Page page,string script)
{
page.ClientScript.RegisterStartupScript(page.GetType(), "message", "<script language='javascript' defer>" + script + "</script>");
}