I have created a directory on the c drive of our web server where users on our local network will drop PDF files.
I have written a routine in asp.net [vb] that iterates through the files in that directory and builds a bulleted list with href links based on the file name and path.
Problem is, the href renders the files with links like this:
This is not a valid url or clickable link.
How do turn the file path shown above into a clickable link that visitors to the website can click on to view the PDFs?
Here is the code:
Dim strGrapeVineHREF As String
Dim strGrapeVineLink As String
Dim strPath As String = "C:\GrapevinePDFs"
For Each strGrapeVineHREF In System.IO.Directory.GetFiles(strPath, "*.pdf")
strGrapeVineLink = GrapeVineVerboseName(strPath, strGrapeVineHREF)
Dim li As New HtmlGenericControl("li")
li.InnerHtml = "<a href=""" & strGrapeVineHREF & """ title=""View Grapevine Article"" target=""_blank"">" & strGrapeVineLink & "</a>"