mike wrote:
I have a user who stored a file with a # in the filename, something
like:
testing#.txt
So, when the web page displays it the html looks like:
<a href="http://mydomain.com/files/testing#.txt">testing#.txt</a>
When I click on the link I get an error message like:
HTTP 404 - File not found
Internet Information Services
How can I allow the user to continue to put #'s in their filename and
have them assessible on the page?
The '#' character (amongst others) must be encoded when used in the URL's
path part. A literal '#' marks the start of the fragment part. What the
browser does, when you click the link above, is requesting the file
http://mydomain.com/files/testing and looks for an element with the ID
'.txt' in it - obviously not what you are looking for.
Replace '#' by '%23' to get it working:
<a href="http://mydomain.com/files/testing%23.txt">testing#.txt</a>
--
Benjamin Niemann
Email: pink at odahoda dot de
WWW:
http://www.odahoda.de/