I have a commercial program that stores PDF files to SQL 2005. I would like to be able to search for (I have that part) and then display the PDF file in a browser. It's the 'display the PDF file' that I'm having trouble with. I am using HTTP/ASP and would prefer to continue that way. I don't know anything about ASP.NET, so that would not be helpful to me. Any help would be appreciated. Thanks.
Asked
Active
Viewed 933 times
1
-
Related post: http://stackoverflow.com/questions/1811686/link-to-retrive-pdf-file-from-db-in-asp-net – Oded Mar 02 '11 at 21:22
1 Answers
1
The best option here is to implement a HttpHandler that fetches the binary data from your database and outputs it to the response stream. This is the most efficient method available in ASP.Net.
There are many questions about HttpHandlers on SO, so implementing one should be easy: https://stackoverflow.com/questions/tagged/httphandler
One thing you should be aware of is that you should set the correct content type so that the browser recognices the pdf document.

Community
- 1
- 1

Rune Grimstad
- 35,612
- 10
- 61
- 76