使用了AJAX控件后,.NET 后台写Response.Write("<script>alert('对不起,账号和密码错误')</script>"); 报 错误: Sys.WebForms.PageRequestManagerParserErrorException: 未能分析从服务器收到的消息。
解决方法:
ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "updateScript", "alert('对不起,账号和密码错误');", true);
其中UpdatePanel1 是你使用的AJAX控件名称