We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

Download to excel using AJAX

Thread ID:

Created:

Updated:

Platform:

Replies:

60507 May 7,2007 09:49 AM Dec 25,2007 11:20 PM ASP.NET Web Forms (Classic) 3
loading
Tags: XlsIO
Eswari
Asked On May 7, 2007 09:49 AM

I am having an Web project, in which AJAX has been implemented at the page level. I am having an user control with a link to download an excel file using Syncfusion, which is placed inside that page. Now if i try to download the excel file it shows an error as

'Sys.WebForms.PageRequestManagerParserErrorException: Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or Server Trace is enabled.'


When i place the same user control in a page which does not have AJAX implemented, it works fine.

What should i do for that?




Melba Winshia [Syncfusion]
Replied On May 8, 2007 05:54 AM

Hi Eswari,

Thanks your interest in Essential XlsIO.

I created a web project in which AJAX has been implemented at the page level. But I was not able to reproduce any issues. Here is the test sample that I used to test this issue:

http://www.syncfusion.com/Support/user/uploads/AJAXEnabledWebSite1_942b65c6.zip

Here is the video clip for your reference:

http://www.syncfusion.com/Support/user/uploads/TestAjax_251a0a04.zip

Could you please take a look at the sample above and kindly let me know if you still find any problem, if not could you please modify this sample so that I can reproduce the issue? This would help me in investigating this issue further.

Thanks,
Melba

Olivier Sallier
Replied On November 30, 2007 07:34 AM

Hi there,

I had the same issue but managed to fix it registering my button to send full postback. The problem lies in the fact that asynchronous postbacks are sent which means that the page on the client does not expect to receive an Excel document. Here is what you have to do to register your buttons:


protected override void OnPreRender(EventArgs e)
{
ScriptManager scriptManager = ScriptManager.GetCurrent(this.Page);
//ButtonExcelExport is the button firing the Excel download
scriptManager.RegisterPostBackControl(this.ButtonExcelExport);
base.OnPreRender(e);
}



Here is an interesting acticle about the PageRequestManagerParserErrorException :

http://weblogs.asp.net/leftslipper/archive/2007/02/26/sys-webforms-pagerequestmanagerparsererrorexception-what-it-is-and-how-to-avoid-it.aspx


I found the answer to my problem here:

http://forums.asp.net/p/1040926/1596279.aspx



Rajarajeswari S [Syncfusion]
Replied On December 25, 2007 11:20 PM



Hi,

Thanks for using Syncfusion products.

We are glad to know that you have got the solution.

Thanks a lot for giving the links.

Regards,
Raji


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;