c#后台alert出来变乱码问题解决


                                string strScript = "<script charset='utf-8' Language=Javascript>if( confirm('参数存在不安全字符') ) {window.history.back(-1); } else { window.history.back(-1);}</script>";

                                StringBuilder sb = new StringBuilder();

                                sb.Append("<html>");

                                sb.Append("<head>");

                                sb.Append("<meta charset=\"utf-8\" />");

                                sb.Append(strScript);

                                sb.Append("</head>");

                                sb.Append("</html>");

                                System.Web.HttpContext.Current.Response.Write(sb);

                                System.Web.HttpContext.Current.Response.End();