Hemant Kothiyal
Hemant Kothiyal

Reputation: 4152

The message received from the server could not be parsed

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.

Upvotes: 18

Views: 65296

Answers (5)

Sako73
Sako73

Reputation: 10147

I got this error message when I put an UpdatePanel inside of another UpdatePanel.

Upvotes: 1

Tran Anh Hien
Tran Anh Hien

Reputation: 757

  • If use in Repeater: event rpt_ItemDataBound add:

    ImageButton btnDownload = (ImageButton)e.Item.FindControl("btnDownload ");

               if (btnDownload != null)
               {   ScriptManager.GetCurrent(this.Page).RegisterPostBackControl(btnDownload);
                   var scriptManager = ScriptManager.GetCurrent(this.Page);
                   if (scriptManager != null)
                     scriptManager.RegisterPostBackControl(btnDownload);
               }
    

Upvotes: 1

SGB
SGB

Reputation: 301

Add PostBackTrigger in UpdatePanel with the ControlID

</ContentTemplate>
<Triggers>
    <asp:PostBackTrigger ControlID="PostbackButtonName" />
</Triggers>

Upvotes: 30

Objectivist
Objectivist

Reputation: 163

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);            
}

Upvotes: 14

cheesedog
cheesedog

Reputation: 21

After being stumped for a while, I finally realized that I had been setting the "runAllManagedModulesForAllRequests" value to "true" in my web.config, and had subsequently removed the Module but not this setting.

By switching my web.config setting to:

<system.webServer>
  <modules runAllManagedModulesForAllRequests="false"/></system.webServer>

Done Deal...! :)

Upvotes: 2

Related Questions