only you need to add this content on your page
Response.ContentType = "application/pdf";
Response.AddHeader("content-disposition", "attachment; filename= SampleExport.pdf");
Response.End();
Even you can format the text also,if you want to set the page with A4 or any other even you can also do the same.you can also specify the font size, style color all the basic things you can do with it.
you can download the code from the below link. you can try that it will helps you.
download Source
Thank you. It saved me a lot of headache and hours.
ReplyDeleteglad it could help you :)
ReplyDeleteThank you. Excelent!!!
ReplyDeleteThank you for the response.
Deletehi you can even use entire grid-view into the pdf with password protected. you can use itextpdf which is very simple to use and just need to integrate the response on the object.
ReplyDeleteon my comming post i will implement the same