
Getting blanks in filenames to appear in dynamically built href's
how do you accomplish dynamically building in VB.net a list of
href's that refer to filenames that may contain blanks? i.e., i want to
do:
dim dir as DirectoryInfo("C:\")
dim f as FileInfo
for each f in dir.GetFiles("*.pdf")
dim name as [String] = f.name
Response.Write("<p><a href=" & name & ">" & name & "</a></p>")
next f
But if a file "hello there.pdf" exists the href only refers to "hello", not
the full
string. I have tried replacing the spaces with "%20" [hexadecimal for a
blank]
but this didn't work, nor did various combinations of quotes,double quotes
etc.
anyone have any thoughts?
thx
j.