Reputation: 4152
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
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
Reputation: 10147
I got this error message when I put an UpdatePanel inside of another UpdatePanel.
Upvotes: 1
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
Reputation: 301
Add PostBackTrigger in UpdatePanel with the ControlID
</ContentTemplate>
<Triggers>
<asp:PostBackTrigger ControlID="PostbackButtonName" />
</Triggers>
Upvotes: 30
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
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