Hash Symbol Link problems

  • Thread starter Thread starter ree32
  • Start date Start date
R

ree32

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?
 
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#zaer")%>">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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top