Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The message received from the server could not be parsed

Tags:

ajax

asp.net

I am getting following error in asp.net webpage

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.

The scenario of my page is as following

  1. I have asp.net page that is implementing Ajax
  2. User Control all code is inside update panel
  3. Model popup extender at aspx page for User Control.

When I click a button on the aspx page a popup appears, but further when I click button at user control responsible for population of grid / click on the radio button to fill the dropdown list in both case the above-mentioned error appears.

like image 896
Hemant Kothiyal Avatar asked Apr 22 '10 13:04

Hemant Kothiyal


2 Answers

Add PostBackTrigger in UpdatePanel with the ControlID

</ContentTemplate>
<Triggers>
    <asp:PostBackTrigger ControlID="PostbackButtonName" />
</Triggers>
like image 52
SGB Avatar answered Nov 03 '22 19:11

SGB


Had to register the button for post back with the ScriptManager:

protected void Page_Load(object sender, EventArgs e)
{
    System.Web.UI.ScriptManager.GetCurrent(this).RegisterPostBackControl(btnExport);            
}
like image 13
Objectivist Avatar answered Nov 03 '22 18:11

Objectivist