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. Image for the cookie policy date
close icon

Response stopped after "doc.save(fileName, Response, HttpReadType.Save)"

Hello,

I have a problem with my PDF save.
I have a page with grid and several filters. I have a button to generate my grid in PDF and displayed a save window.

When I input a new filter and click on the "Generate PDF" button, the new filter must be apply before PDF generation.
But it doesn't work correctly : the grid is not refreshed in the page and in the PDF.

If I comment the line "doc.Save(lFileName, Response, HttpReadType.Save);" the gridView is refreshed.. but I don't have my PDF.

It seems the "save" method stop the response.
Have you a solution to get my gridView refreshed and the save Windows ?

J.L.

1 Reply

GM Geetha M Syncfusion Team June 7, 2012 11:50 AM UTC

Hi Joffrey,

Thank you for your interest in Syncfusion products.

Could you please try to save the file to disk using the following code snippet?

doc.Save(Server.MapPath(@"App_Data\Sample.pdf"));

The above code saves  the document to disk instead of sending the document through HttpResponse.

Please try this and let me know if you have any questions.

Regards
Geetha

Loader.
Live Chat Icon For mobile
Up arrow icon