出错提示:Sys.WebForms.PageRequestManagerParserErrorException:The message received from the server
count not be parsed.Common causes for this error are when the response is modified by calls to response.Write(),response filters,HttpModules,or server trace is enabled.
在使用updatepanel时不能直接在后台使用Response.Write输出或用JS弹出窗口,应该改用ScriptManager.RegisterStartupScript(this.UpdatePanel1, this.GetType(), "updateScript", "alert('对不起,账号和密码错误');", true); 这样的方式来输出。
本文探讨了ASP.NET AJAX中UpdatePanel组件的正确使用方法,特别是在后台使用Response.Write及JavaScript弹窗时的问题。建议使用ScriptManager.RegisterStartupScript替代,以避免Sys.WebForms.PageRequestManagerParserErrorException错误。
239

被折叠的 条评论
为什么被折叠?



