Where do I go wrong when using URLencode?

A

Avi

<A href= "GenericUploader.asp?SavePath=<%=server.URLEncode("D:\my new
web site\U") %>">folder name</A>

the link above does not seem to produce the appropriate query string
value upon being clicked on. That is, when an internet user clicks on
that link, the Internet Explorer opens the GenericUploader.asp web
page, and the code in that asp web page responsible for picking up the
value corresponding to the argument 'SavePath' (i.e,
request.querystring("SavePath")) returns solely the first word of the
value rather than the entire CORERECT value, which is 'D:\my'rather
than 'D:\my new web site\U'.

Can anyone tell me what needs to be done?


Thank you in advance

Avi
 
M

Mark Schupp

View source on the page containing the link and see what HTML is produced.
If that does not indicate the problem post the HTML that you see for the
link along with the ASP page that is trying to use the parameter.
 
B

Bã§TãRÐ

A simple solution would be to make the folder name "my_new_web_site"
When dealing with dir names in IIS - its doesnt like spaces in folder names.

- Bastard
 
A

Avi Semah

hi,

thank you all for your replies. Ast turns out, the we bape responsible
for picking up the values associated with the argument was not
retrieving the values properly. When picking the value I used something
like this inside an htnl tage (i.e., input tag) :
< ... value=<%= request.querystring("SavedPath")%> size="50" ... >

The only thing I forgot to do is to delimit the expression above with
quotes, like this :
< ... value="<%= request.querystring("SavedPath")%>" size="50" ...>

note : the elipsis speak for them seleves and indicate that the above
snippets of code are ONLY part of an html tag definition (text box),
the part that is relevant to the problem at hand.


once again thank you all
avi
 

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

Members online

Forum statistics

Threads
474,159
Messages
2,570,881
Members
47,418
Latest member
NoellaXku

Latest Threads

Top