Ask a Question related to ASP, Design and Development.
-
Don Grover #1
Query string in asp page
In asp how How can i pass a parameter value with a space in the value
like this
test.asp?catalog=aValue&lineitem=ladies cloths
I get a %20 as a space in the browser window,
Regards
Don
Don Grover Guest
-
query string
hi there, i'm working on a very simple flash data integration project, i have been trying to send a query string without opening/reloading a... -
Maintain query string and somehow auto refresh a pagewith that string intact
I have a drill down where on page one the user selects criteria to narrow down the search for a speicific group of employees(like all hired between... -
Using NOT LIKE in Query String????
OK, I know how to use to pull up all records that contains the keyword, but what about not containing the keyword? I've tried NOT LIKE but i get ... -
Query String - encrypt
All, I often use a querystring in my ASP pages. for example: if val > 1 then Response.redirect "val1.asp?val=1&user=UserID End if Is there a... -
Quick String Query...
I have been using PHP for a while now, although my knowledge of the inbuilt functions is pretty lacking. I am trying to remove a 'space' from the... -
Gram #2
Re: Query string in asp page
Don,
Usually the %20 doesn't cause problems for me, but if you have to keep the
space, you might try:
<%
query = request.querystring("query")
query = Replace(query, "%20", " ")
response.write query
%>
<a href="test.asp?query=my name">Click me</a>
The replace function here removes any '%20' it finds and replaces it with a
space
Hope this helps.
Gram
Gram Guest
-
Kai Boenke #3
Re: Query string in asp page
Gram wrote:
[snip replace function]This won't work due to the nature of the HTTP standard (should be> The replace function here removes any '%20' it finds and replaces it with a
> space
somewhere within RFC 2616).
Because a http query string cannot contain spaces within a request
(blanks are userd as separators f.ex. "GET index.html") they are being
replaced by your browser automatically. Therefore some kind of
server-sided replace function will not work - and even should not work.
However, your webserver knows about this and replaces all %20 with
spaces so you can access your variables again with spaces instead of %20.
This does affect other special characteres as well. There is a
server-function that you can use to encrypt a string before processing
your document to the client: Server.HTMLencode (SomeString)
Kai Boenke Guest
-
Ray at #4
Re: Query string in asp page
Or Server.URLEncode(SomeString)
Ray at home
"Kai Boenke" <kai.boenke@de.bosch.com> wrote in message
news:bmoag2$436$1@ns2.fe.internet.bosch.com...with a> Gram wrote:
> [snip replace function]> > The replace function here removes any '%20' it finds and replaces it>> > space
> This won't work due to the nature of the HTTP standard (should be
> somewhere within RFC 2616).
> Because a http query string cannot contain spaces within a request
> (blanks are userd as separators f.ex. "GET index.html") they are being
> replaced by your browser automatically. Therefore some kind of
> server-sided replace function will not work - and even should not work.
> However, your webserver knows about this and replaces all %20 with
> spaces so you can access your variables again with spaces instead of %20.
>
> This does affect other special characteres as well. There is a
> server-function that you can use to encrypt a string before processing
> your document to the client: Server.HTMLencode (SomeString)
>
Ray at Guest
-
Kai Boenke #5
Re: Query string in asp page
Ray at <%=sLocation%> wrote:
You are right.> Or Server.URLEncode(SomeString)
>
> "Kai Boenke" <kai.boenke@de.bosch.com> wrote in message
> news:bmoag2$436$1@ns2.fe.internet.bosch.com...>> [snip other stuff]
>>This does affect other special characteres as well. There is a
>>server-function that you can use to encrypt a string before processing
>>your document to the client: Server.HTMLencode (SomeString)
"Server.HTMLencode (SomeString)" actually does something different (not
completely but useless in this case): Converting characters to HTML
entities.
Kai Boenke Guest



Reply With Quote

