468,514 Members | 1,625 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,514 developers. It's quick & easy.

Asp space between characters in querystring

229 100+
Hi, I wonder if anyone could give a clue about how one deals with space between characters in querystrings.

For example i have links like

page.asp?country=<%=rs("country")%>

This often results in
page.asp?country=american art

with the result with a space between the query. I would like to swap the spaces for "-".

Is it something like this that one has to use?

Replace(country, " ", "-", 1, -1, 1)

If so how would one write that in? with response write?


<%
response.write

%>

Thanks for any pointers
Richard
Jan 31 '12 #1

✓ answered by Rabbit

Yes, you would use the replace function.
Expand|Select|Wrap|Line Numbers
  1. page.asp?country=<%=Replace(rs("country"), " ", "-")%>

1 2388
Rabbit
12,513 Expert Mod 8TB
Yes, you would use the replace function.
Expand|Select|Wrap|Line Numbers
  1. page.asp?country=<%=Replace(rs("country"), " ", "-")%>
Jan 31 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by mr_burns | last post: by
2 posts views Thread by braindead | last post: by
38 posts views Thread by Xah Lee | last post: by
4 posts views Thread by DaveF | last post: by
reply views Thread by NPC403 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.