Problem with Request.Query

B

Bob Barrows [MVP]

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.
 
D

Dave Anderson

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.
 

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

No members online now.

Forum statistics

Threads
474,144
Messages
2,570,823
Members
47,369
Latest member
FTMZ

Latest Threads

Top