Cómo evitar el error Sys.WebForms.PageRequestManagerParserErrorException

Utilizando ASP.NET 3.5 y AJAX me encontré con la siguiente excepción:

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 Response.Write(), response filters, HttpModules, or server trace is enabled.

sys.gif

Para solucionarlo simplemente agrega una sección triggers a tu updatepanel referenciando al botón que envía el formulario. Así:

ASP:
  1. <asp:UpdatePanel ID="UpdatePanel1" runat="server">
  2.    <Triggers>
  3.       <asp:PostBackTrigger ControlID="MiBoton" />
  4.    </Triggers>
  5.    <ContentTemplate>
  6.    ...tu contenido aquí...
  7.    </ContentTemplate>
  8. </asp:UpdatePanel>

Normalmente esto siempre funciona, pero si no, visita esta página que contiene toda la explicación completa y más opciones de resolución.

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.