【发布时间】:2011-01-25 13:57:29
【问题描述】:
一切正常。然后我添加了Global.asax,突然出现这个错误:
线路:4723 错误:Sys.WebForms.PageRequestManagerParserErrorException:无法解析从服务器接收到的消息。此错误的常见原因是通过调用 Response.Write()、响应过滤器、HttpModules 或启用了服务器跟踪来修改响应。 详细信息:在 'eeCtrl_Data = null;| 附近解析错误
<%@ Application Language="VB" %>
<script runat="server">
Sub Application_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs on application startup
End Sub
Sub Application_End(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs on application shutdown
End Sub
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when an unhandled error occurs
End Sub
Sub Session_Start(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when a new session is started
End Sub
Sub Session_End(ByVal sender As Object, ByVal e As EventArgs)
' Code that runs when a session ends.
' Note: The Session_End event is raised only when the sessionstate mode
' is set to InProc in the Web.config file. If session mode is set to StateServer
' or SQLServer, the event is not raised.
End Sub
Protected Sub Application_BeginRequest(ByVal sender As Object, ByVal e As System.EventArgs)
HttpContext.Current.Items("renderStartTime") = DateTime.Now
End Sub
Protected Sub Application_EndRequest(ByVal sender As Object, ByVal e As System.EventArgs)
Dim startTime As DateTime = CType(HttpContext.Current.Items("renderStartTime"), DateTime)
Dim renderTime As TimeSpan = DateTime.Now - startTime
HttpContext.Current.Response.Write("<!-- Render Time (in milliseconds): " & renderTime.TotalMilliseconds.ToString & " -->")
End Sub
【问题讨论】:
标签: asp.net asp.net-ajax ajaxcontroltoolkit global-asax