Reputation: 24322
I don't have grid view as I am working on asp.net MVC.
So can I create Response object which writes data into pdf format
Response.AddHeader("Content-Disposition", "attachment; filename=data.pdf");
Response.ContentType = "application/.pdf";
I use these two lines but I don't know in which format, I should write data?
Upvotes: 1
Views: 5072
Reputation: 2852
you must use a pdf library like iTextSharp. just do a google search. I usually generate my pdf reports on the fly using report viewer control (client-side mode).
Upvotes: 2
Reputation: 30945
LOL.
You need to get PDF converter to convert from whichever format you use to PDF. The last I checked there were no fully functional converters for free. Buy it, buddy.
Upvotes: 0