今天在使用Response.Write("<script language='javascript'>window.open(');</script>"); 时,弹出来一个提示对话框
Sys.WebForms.PageRequestManagerParserErrorException:
The message received from the server could not be parsed . Common causes for this error are when the response is modified by calls to Responsed.Write(),response filters,HttpModules, or server trace is enabled.
Details:Error parsing near' <script> window.open(''.
原因是UpdatePanel里面不太支持js脚本。
后来改为
System.Web.UI.ScriptManager.RegisterStartupScript(UpdatePanel1, this.GetType(), "", "window.open('')", true);
就能用了。
Sys.WebForms.PageRequestManagerParserErrorException:
The message received from the server could not be parsed . Common causes for this error are when the response is modified by calls to Responsed.Write(),response filters,HttpModules, or server trace is enabled.
Details:Error parsing near' <script> window.open(''.
原因是UpdatePanel里面不太支持js脚本。
后来改为
System.Web.UI.ScriptManager.RegisterStartupScript(UpdatePanel1, this.GetType(), "", "window.open('')", true);
就能用了。