刷新父页面RefreshParentPage()

  private void RefreshParentPage()
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("<script>\n");
            sb.Append("var pWindow = window.parent.opener;\n");
            sb.Append("if(pWindow != null && pWindow.document.all.btnQuery != null)\n");
            sb.Append("{pWindow.document.all.hfRefresh.value=1;pWindow.document.all.btnQuery.click();}\n");
            sb.Append("pWindow = window.parent.parent;\n");
            sb.Append("if(pWindow != null && pWindow.gridframe != null && pWindow.gridframe.document.all.btnQuery != null)\n");
            sb.Append("{pWindow.gridframe.document.all.hfRefresh.value=1;pWindow.gridframe.document.all.btnQuery.click();}\n");
            sb.Append("</script>");
            this.ClientScript.RegisterStartupScript(this.GetType(), "refreshparent", sb.ToString());
        }

 

posted @ 2025-07-31 08:03  知行一体2  阅读(4)  评论(0)    收藏  举报