By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,867 Members | 1,981 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,867 IT Pros & Developers. It's quick & easy.

Asp space between characters in querystring

100+
P: 229
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"), " ", "-")%>

Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,370
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.