473,387 Members | 3,820 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,387 software developers and data experts.

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 2496
Rabbit
12,516 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

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

Similar topics

12
by: lawrence | last post by:
I'm bad at regular expressions. Is this how I would look for any set of characters that go more than 60 characters without a white space? ..{60} Also, does this match a block of PHP in an...
3
by: mr_burns | last post by:
Hi there, How do I remove space characters from a string using PHP? For example, the following string... ' hi there, my name is burnsy ' ....has spaces, at the edges and inbetween the...
2
by: braindead | last post by:
Hi All Is 1. dopage.asp?<% =SessionID=value_here%> is different tha 2. dopage.asp?<%=SessionID=value_here%> ?? Please note that there is a space between the asp tags and the = sign in the...
38
by: Xah Lee | last post by:
sometimes i wish to add white space in <p> as to achived effects similar to tab. what should i do? using empty image seems the sure way but rather complicated. (and dosen't change size with...
3
by: Andy B | last post by:
I've tried using Trim or RTrim to strip trailing space characters from my data. When I check on the transformed data space characters are still there. We have an address table containing two...
35
by: Durgesh Sharma | last post by:
I want to use strrchar(source_string,last_char ) function from string.h header file,to find out the last occurrence of the NON SPACE Alphanumeric Character. Then i will put a NULL CHAR after...
4
by: steve bull | last post by:
I would like to recognize whitespace or nonascii characters in keyboard input. Is there an easy way to do this test? I could do e.KeyChar < '!' || e.KeyChar > '~' but this seems to make the...
2
by: Buddy Ackerman | last post by:
Apparently .NET strips these white space characters (MSXML doesn't) regardless of what the output method is set to. I'm using <xsl:text> </xsl:text> to output a tab character and...
4
by: DaveF | last post by:
I am looping threw the querySting with: foreach (string name in Request.QueryString) I have a problem with a '&' being in one of the values. How do I deal with this? ...
2
by: helloitsme | last post by:
Hello! I created a batch file, which contains a string. But the string is written in the file with a space character between 2 consecutive characters ... When I write the same string in a *.txt...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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.