Click to See Complete Forum and Search --> : url varible problem


Natdrip
09-13-2005, 03:05 PM
ok, this is really making me upset.

I have a form and I am using method=post on submit to it's self.

I have a text box this is a search.

I want the url searchstr to repopulate the the search text box after the submit.

here is the problem:
request("searchstr")
<input type='text' name='searchstr' size="18" ID="Text2" value=<%=searchstr%>>

lets say I have a search with more then one word like "apple pies"

after I press submit only the word "apple" appears

I want the whole string to appear.

how can i do this :confused:

by the way "apple pies" appears like this in url
"apple+pies"

HaganeNoKokoro
09-13-2005, 03:10 PM
<input type='text' name='searchstr' size="18" ID="Text2" value="<%=searchstr%>">
Would be my best guess. You may also want to use <input type='text' name='searchstr' size="18" ID="Text2" value="<%=Server.HTMLEncode(searchstr)%>">So if a person puts quotes, they'll get encoded and not mess with the quotes in the tag

Natdrip
09-13-2005, 03:32 PM
HaganeNoKokoro you are awsome thanks a bunch I just used the "" and it worked.

now if I could some how devise a way to use "" and take over the world.. :D

I can't believe I left out the quotes...