| Author |
Problem with Request.Query
|
|
| yuvalbra@gmail.com 2006-02-27, 6:56 pm |
| when i transfer string with URL that include space LIKE
www.domaun.com/page.asp?n=victor yakov
its open on the browser:
www.domaun.com/page.asp?n=victor yakov
and when i call the Variable n by the command Request.Query("n")
I got just the first name: victor
How to fix that?
Can anyone know how to commpress some varible on 1 URL link ?
| |
| Bob Barrows [MVP] 2006-02-27, 6:56 pm |
| yuvalbra@gmail.com wrote:
> when i transfer string with URL that include space LIKE
> www.domaun.com/page.asp?n=victor yakov
> its open on the browser:
> www.domaun.com/page.asp?n=victor yakov
>
> and when i call the Variable n by the command Request.Query("n")
>
> I got just the first name: victor
>
> How to fix that?
> Can anyone know how to commpress some varible on 1 URL link ?
You need to encode the space in the url:
www.domaun.com/page.asp?n=victor%20yakov
If using creating the url in client-side script, you can use the escape()
function to build it.
If the url is created in server-side code, use the Server.URLEncode function
to encode it.
--
Microsoft MVP -- ASP/ASP.NET
Please reply to the newsgroup. The email account listed in my From
header is my spam trap, so I don't check it very often. You will get a
quicker response by posting to the newsgroup.
| |
| Dave Anderson 2006-02-27, 6:56 pm |
| yuvalbra@gmail.com wrote:
> when i transfer string with URL that include space LIKE
> www.domaun.com/page.asp?n=victor yakov
> its open on the browser:
> www.domaun.com/page.asp?n=victor yakov
>
> and when i call the Variable n by the command Request.Query("n")
No such animal. I suppose you mean Request.QueryString("n").Item
> I got just the first name: victor
>
> How to fix that?
> Can anyone know how to commpress some varible on 1 URL link ?
Server.URLEncode("victor yakov")
--
Dave Anderson
Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
|
|
|
|