Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Hash Symbol Link problems

Reply
Thread Tools

Hash Symbol Link problems

 
 
ree32@hotmail.com
Guest
Posts: n/a
 
      08-03-2005
I am having problems displaying links with # in the filenames.

When it is clicked it doesn't show.

I have tried converting the # to %23 and still no luck.

Tried server.urlEncode and still no luck.

Is there a way around this or is just # the url killer?

 
Reply With Quote
 
 
 
 
Tom.PesterDELETETHISSS@pandora.be
Guest
Posts: n/a
 
      08-03-2005
> I have tried converting the # to %23 and still no luck.

Are you sure? Cause that works for me.

Remember that a # in a url is used to refere to anchors like in index.html#top

So an url like index.html?r=pas#id has pas as its value for r and says to
the browser to go to the section id once that page is rendered.

I tested the following code and it works for me :


<a href="destfile.aspx?r=<%=Server.Urlencode("ezra#za er")%>">destfile.aspx</a>

In the destfile.aspx I wrote this :

<%Response.Write(Request["r"]);%>

And the value printed is ezra#zaers

I hope it helps...


Cheers,
Tom Pester

> I am having problems displaying links with # in the filenames.
>
> When it is clicked it doesn't show.
>


>
> Tried server.urlEncode and still no luck.
>
> Is there a way around this or is just # the url killer?
>



 
Reply With Quote
 
 
 
 
ree32@hotmail.com
Guest
Posts: n/a
 
      08-04-2005
Try renaming a file with a # syumbol inside.

Then add a link to it in a html page and try opening it by clicking the
link.

MS IE says it cannot find the resource.

http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:

> <a href="destfile.aspx?r=<%=Server.Urlencode("ezra#za er")%>">destfile.aspx</a>
>
> In the destfile.aspx I wrote this :
>
> <%Response.Write(Request["r"]);%>
>
> And the value printed is ezra#zaers
>
> I hope it helps...
>
>
> Cheers,
> Tom Pester
>
> > I am having problems displaying links with # in the filenames.
> >
> > When it is clicked it doesn't show.
> >

>
> >
> > Tried server.urlEncode and still no luck.
> >
> > Is there a way around this or is just # the url killer?
> >


 
Reply With Quote
 
Tom.PesterDELETETHISSS@pandora.be
Guest
Posts: n/a
 
      08-04-2005

Remember that a # in a url is used to refer to anchors like in index.html#top

So if you have file name report#bug.aspx than the browser will send a request
for the file "report" and look for an anchor bug.aspx which is nonsens of
course.

# Is an invalid charachter when nameing files used on the web.


Cheers,
Tom Pester

> Try renaming a file with a # syumbol inside.
>
> Then add a link to it in a html page and try opening it by clicking
> the link.
>
> MS IE says it cannot find the resource.
>
> (E-Mail Removed) wrote:
>
>> <a
>> href="destfile.aspx?r=<%=Server.Urlencode("ezra#za er")%>">destfile.as
>> px</a>
>>
>> In the destfile.aspx I wrote this :
>>
>> <%Response.Write(Request["r"]);%>
>>
>> And the value printed is ezra#zaers
>>
>> I hope it helps...
>>
>> Cheers,
>> Tom Pester
>>> I am having problems displaying links with # in the filenames.
>>>
>>> When it is clicked it doesn't show.
>>>
>>> Tried server.urlEncode and still no luck.
>>>
>>> Is there a way around this or is just # the url killer?
>>>



 
Reply With Quote
 
ree32@hotmail.com
Guest
Posts: n/a
 
      08-07-2005
Good thats what I wanted to here.

(E-Mail Removed) wrote:

> # Is an invalid charachter when nameing files used on the web.
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
(Encryption Package) error: cannot find symbol symbol: class BaseNCode clusardi2k@aol.com Java 6 08-29-2012 08:33 PM
hash of hash of hash of hash in c++ rp C++ 1 11-10-2011 04:45 PM
Why ":symbol" failed but 'symbol' successed with JRuby 1.0.3? Song Ma Ruby 2 07-20-2008 04:08 AM
Hash#select returns an array but Hash#reject returns a hash... Srijayanth Sridhar Ruby 19 07-02-2008 12:49 PM
what's differnece between #ifdef symbol and #if defined(symbol) baumann@pan C Programming 1 04-15-2005 08:25 AM



Advertisments