javascript - Getting error - SCRIPT5022: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the serv

admin2025-04-19  0

I need help. I have create one web application in .Net 3.5 which uses asp Master page, update panel and server controls. I have asp page which is created using Master page, it contains updte panel in it and update panel contains other server controls. I am trying to generate postback of link button, which is in Update panel, from javascript using

__doPostBack('<%= ServerControl.ClientID.Replace("_","$") %>', '');

Each browser is executing this code but IE7 is not executing this javascript. I am getting this error in IE7:

SCRIPT5022: 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.
Details: Error parsing near '

<!DOCTYPE html P'. 
ScriptResource.axd?d=83rNjjrfU8utKX3Fb9DiQ2ssFx4VjayT06ZNJ9Aj38iN2ufeWDf1Hd7nu73QshB8Q80tcmosFZ1IQcnqEvC-7nMUe8kLPGpreZP7iBWnviMAl8vzvxmED51yr720yzPv0&t=ffffffffec2d9970, line 513 character 13

I don't know what is causing here. I have tried to set this

ValidateRequest="false" EnableEventValidation="false"

but still it's not working. I have used Update panel because I want to send Asynchronous request to client, so i want to use Asynchrounous postback type event only I don't want to use PostBack type of events (which reloads whole page).

Please any one can help me in this? It will be really great help.

Thanks,

Anvesh

I need help. I have create one web application in .Net 3.5 which uses asp Master page, update panel and server controls. I have asp page which is created using Master page, it contains updte panel in it and update panel contains other server controls. I am trying to generate postback of link button, which is in Update panel, from javascript using

__doPostBack('<%= ServerControl.ClientID.Replace("_","$") %>', '');

Each browser is executing this code but IE7 is not executing this javascript. I am getting this error in IE7:

SCRIPT5022: 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.
Details: Error parsing near '

<!DOCTYPE html P'. 
ScriptResource.axd?d=83rNjjrfU8utKX3Fb9DiQ2ssFx4VjayT06ZNJ9Aj38iN2ufeWDf1Hd7nu73QshB8Q80tcmosFZ1IQcnqEvC-7nMUe8kLPGpreZP7iBWnviMAl8vzvxmED51yr720yzPv0&t=ffffffffec2d9970, line 513 character 13

I don't know what is causing here. I have tried to set this

ValidateRequest="false" EnableEventValidation="false"

but still it's not working. I have used Update panel because I want to send Asynchronous request to client, so i want to use Asynchrounous postback type event only I don't want to use PostBack type of events (which reloads whole page).

Please any one can help me in this? It will be really great help.

Thanks,

Anvesh

Share Improve this question asked Sep 7, 2012 at 10:52 user970697user970697
Add a ment  | 

3 Answers 3

Reset to default 3

Most mon reasons for that error:

  • Calls to Response.Write():
  • Response filters
  • HttpModules
  • Server trace is enabled
  • Calls to Server.Transfer()

Refer to this blog for more details on avoiding the error Sys.WebForms.PageRequestManagerParserErrorException - what it is and how to avoid it

Ok I have solved this problem myself.

What I have done is I have set

ValidateRequest="false"

in page directive. Also I have remove action="#" from form tag.

I have changed this

<form id="Form1" method="post" action="#" runat="server">

to this:

<form id="Form1" method="post" runat="server">

I am writing reply over here so if any one is facing the same problem then he can use this solution.

Thanks, Anvesh

I had the same problem and I noticed that the error was being caused due to an error in an existing trigger in the table in which I was doing the insert.

Fixed the trigger and it worked

转载请注明原文地址:http://conceptsofalgorithm.com/Algorithm/1745001627a279260.html

最新回复(0)