473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

# giving me problems

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?

Mike

Jul 24 '05 #1
4 1291
in comp.infosystems.www.authoring.html, mike wrote:
How can I allow the user to continue to put #'s in their filename and
have them assessible on the page?


Not using # in URL. You might try url encoding.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/bu...tml?AID=882173
Jul 24 '05 #2
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/
Jul 24 '05 #3

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?


When you create the URL, be sure to change any "#" to "%23", i.e.

<a href="http://mydomain.com/files/testing%23.txt">testing#.txt</a>

Mark

Jul 24 '05 #4
That fixed it !!!! Thank you very much.

Jul 24 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Drew | last post by:
I have the following simple conditional on my page, If EmpIDError <> 1 Then 'Show Input items End If Now I need to add another conditional to this, If PosIDError <> 1 Then 'Show input...
9
by: David Méndez | last post by:
Hi, If I have the preorder and inorder list, which algorithm does I need to build the corresponding B-TREE? where can I find some source code? thanks -- comp.lang.c.moderated - moderation...
4
by: bissatch | last post by:
Hi, I have the following simple HTML page. I am trying to get the innerHTML of the table element, "xmltable". I do intend to change the innerHTML of this table but at this stage I am having...
1
by: Gary Townsend | last post by:
Server OS: Windows 2000 Server SP4 IIS: 5.0 Component Language: Visual Basic 6.0 Hey folks quick question hopefully be a quick answer too... I built an ActiveX DLL Component to manipulate file...
5
by: washoetech | last post by:
Hello, I have tried to run my ASP.NET 2.0 application from IIS and I get a page not found error. When I debug from within Visual Studio.NET 2005 my application works fine. Any ideas? ...
17
by: Leif | last post by:
Hello All, Last week (11 Nov 05) with the Subject header: "XHTML 1.0 Strict validation problem", I tried to describe a validation problem with text added to my source files in XHTML. I was...
2
by: Sridhar | last post by:
Hi, I have a web form where it has a <input type=file id=file1> control. I have an Upload button to upload the file. WHen I click on browse and select one file, it is showing the full file path...
37
by: Laphan | last post by:
Hi All Two of my friends have Firefox installed with FireBug, which I believe is an extension to test markup, and have found oddles of errors in my CSS even though Firefox and IE display the...
14
by: Aaron Gray | last post by:
Unless someone can show me how to use it I am giving up on VML. Problems 1) I cannot work out how to detect whether it is present. I tried some VB IsObject( CreateObject( ...)) but that did...
4
by: jbiggs via AccessMonster.com | last post by:
I am in the process of converting our backend from Access to mySQL. There are 21 tables and all of them except for one exported correctly. Our clients table is giving me problems and I suspect it...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.