DatabaseDude
Programmer
I am in the process of writing code for uploading PDFs. The page will contain (1) upload control for adding new PDFs and (2) grid that lists current PDFs.
The table in which PDFs will be stored contains fields named AttachmentId (int), Attachment (varbinary(MAX)) and AttachmentFileName nvarchar(200).
The parts I understand:
- Uploading PDF
- Storing PDF in table
- Restricting uploads to PDF file type
- Populating grid to show names (AttachmentFileName) of PDFs
The part I'm not clear on:
- Creating a hyperlink that allows download of the PDF
I know how to accomplish this if the file is stored in a folder, but this is the first time I'm attempting to retrieve it from SQL instead.
Thanks so much in advance for your help!
The table in which PDFs will be stored contains fields named AttachmentId (int), Attachment (varbinary(MAX)) and AttachmentFileName nvarchar(200).
The parts I understand:
- Uploading PDF
- Storing PDF in table
- Restricting uploads to PDF file type
- Populating grid to show names (AttachmentFileName) of PDFs
The part I'm not clear on:
- Creating a hyperlink that allows download of the PDF
I know how to accomplish this if the file is stored in a folder, but this is the first time I'm attempting to retrieve it from SQL instead.
Thanks so much in advance for your help!