473,385 Members | 1,848 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,385 software developers and data experts.

Hash Symbol Link problems

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?

Nov 19 '05 #1
4 3980
> 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?

Nov 19 '05 #2
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.

To********************@pandora.be 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?


Nov 19 '05 #3

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.

To********************@pandora.be 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?

Nov 19 '05 #4
Good thats what I wanted to here.

To********************@pandora.be wrote:
# Is an invalid charachter when nameing files used on the web.


Nov 19 '05 #5

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

Similar topics

2
by: Christopher | last post by:
I have a hash that is several levels deep. ie: 'vars' => { '$filers' => '10.10.10.10/32', '$networksa' => '10.10.10.10/32', '$networksb' => '10.50.0.0/16', '$wintel_boxes' =>...
1
by: Yimin Rong | last post by:
Does anyone know if there are any browsers where you must specify "#" as a prefix when setting the hash for the location? For example, the following would move to the intro section of the...
3
by: Markus Dehmann | last post by:
I have a class "Data" and I store Data pointers in an STL set. But I have millions of inserts and many more lookups, and my profiler found that they cost a lot of runtime. Therefore, I want to...
18
by: Simula | last post by:
I am developing an HTML javascript application and I want to preserve state in a way that can be book-marked. I chose HTML anchors as a means of preserving state. When the application changes...
10
by: eugene | last post by:
I'm trying to compile and run some c++ code to be called from Matlab (mex file) and I'm getting "Invalid MEX-file ... undefined symbol" error. Anybody knows where to look for solution? >>mex...
1
by: Travis Stewart | last post by:
Hi, I've been working on some software to control an older GPIB card for the past couple of weeks. I have function prototypes in a header file pc-mate2.h and the functions are defined in...
4
by: ±èµ¿±Õ | last post by:
Tell me why the symbol "_" use in the Library? For example, char *_itoa( int value, char *string, int radix ); But We use function "itoa(value,string,radix) "only. I want to know the...
7
by: dlarock | last post by:
I wrote the following to do an MD5 hash. However, I have a problem (I think) with the conversion from the Byte MD5 hash back to string. Watching this through the debugger it appears as if the...
0
by: fake ID | last post by:
Since you can't search for these symbols used in asp.net "<%#" or '<%=' I thought i'd post this to make things a little easier to find. Potential search word combinations: -lessthan Percentage...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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.