I have a database that hold some files, which can be Word, Excel or PDF files. I use a Datagridview to show these files and now I want to put a link on my gridview so that when the user clicks on the Hyperlink(?) button the file will open. So far I am not having any luck wiring it all up.
My select query looks like this
VB Code:
SELECT DocID , DocumentName , DocumentPath+DocumentName AS FilePath FROM Documents
This gives me results like this
DocID: 1
DocumentName: Scanning range.doc
FilePath: C:\Docs\Scanning range.doc
My datagridview is showing all the fields correctly and all I need to do is to add the Hyperlink field to do the download but no matter how I try it I am not able to get it to work.
What am I doing wrong?VB Code:
<Columns> <asp:HyperLinkField DataNavigateUrlFields="FilePath" DataNavigateUrlFormatString="DocID={0}" Text="Open" HeaderText="Document" /> </Columns>




Reply With Quote