1using System.Text;
2
3
4//关闭并刷新父窗口
5 public static void CloseWin(string url)
6 {
7 StringBuilder str = new StringBuilder();
8 str.Append("<script language=javascript>");
9 str.Append("var e = (window.parent.opener == undefined) ? dialogArguments : window.parent.opener.document;");
10 str.Append("e.location='" + url + "';");
11 str.Append("window.close();");
12 str.Append("</script>");
13
14 HttpContext.Current.Response.Write(str.ToString());
15 }
2
3
4//关闭并刷新父窗口
5 public static void CloseWin(string url)
6 {
7 StringBuilder str = new StringBuilder();
8 str.Append("<script language=javascript>");
9 str.Append("var e = (window.parent.opener == undefined) ? dialogArguments : window.parent.opener.document;");
10 str.Append("e.location='" + url + "';");
11 str.Append("window.close();");
12 str.Append("</script>");
13
14 HttpContext.Current.Response.Write(str.ToString());
15 }