PageRequestManagerParserErrorException

Was getting the above error at the time of exporting an excel file using the ASPxGridViewExporter. I had a tab control (ASPxPageControl) with some ASPxGridView controls inside all the tab pages. So using the ASPxGridViewExporter when i tried to export an excel file was battered with the following error every time when i tried to export.

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. To sort out the problem you had to register the control which triggers the postback in the page init of the page. The code as follows.

<br />
protected void Page_Init(object sender, EventArgs e)<br />
{<br />
RegisterPostBackControl();<br />
}</p>
<p>private void RegisterPostBackControl()<br />
{<br />
ScriptManager sm = (ScriptManager)Page.Master.FindControl(&quot;MainScriptManager&quot;);<br />
sm.RegisterPostBackControl(ASPxPageControl1);<br />
}

please refer the KB article.

PageRequestManagerParserErrorException – what it is and how to avoid it

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: