Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old February 27th, 2006, 09:05 PM
yuvalbra@gmail.com
Guest
 
Posts: n/a
Default Problem with Request.Query

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 ?

  #2  
Old February 27th, 2006, 09:15 PM
Bob Barrows [MVP]
Guest
 
Posts: n/a
Default Re: Problem with Request.Query

yuvalbra@gmail.com wrote:[color=blue]
> 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 ?[/color]

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.


  #3  
Old February 27th, 2006, 09:15 PM
Dave Anderson
Guest
 
Posts: n/a
Default Re: Problem with Request.Query

yuvalbra@gmail.com wrote:[color=blue]
> 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")[/color]

No such animal. I suppose you mean Request.QueryString("n").Item

[color=blue]
> I got just the first name: victor
>
> How to fix that?
> Can anyone know how to commpress some varible on 1 URL link ?[/color]

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.


 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles