Export Gridview to pdf using asp.net 2.0
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
Hi, How to Export Gridview to pdf in asp.net I searched in many forums. but many of them said to use third party tools. I don't want any third party tools. Suggest me any sample for without using third party tool and export Gridview to pdf The Below code is working, When I open the Pdf file the error is showing that " Adobe reader could not open test.pdf. because the file type hasbeen damaged" How to Resolve this? Thanks in advance
Dim FilePath As String = "c:\test.pdf" response.ContentType = "application/pdf" response.AddHeader("Content-Type", "application/pdf") response.AddHeader("Content-Disposition", "attachment; filename=" + FilePath) response.WriteFile(FilePath) response.end()