Tuesday, 20 August 2013

Put download button in gridview

Put download button in gridview

I have a table called tblfiles with columns
id int
Name varchar(50)
ContentType varchar(50)
Data varbinary(MAX)
the id is incremental, name is the name of the file being uploaded,
Content type tells the type of the file being uploaded such as
"application/PDF" or "application/ms-word" etc... and data is where the
Binary data is being stored.
I have managed to upload data into the database.
I have added a gridview to display the data automatically binded (You know
not manually which is only SELECT all from tblfiles) I want a column that
will display a download hyperlink or button to download the file.
Remember all data is being stored in database not a folder!!
So How can I do this ??

No comments:

Post a Comment