Click here to Skip to main content
15,886,362 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello Every one,
I was struck with a different situation in my project. I have a search box to search products in the store. they can search with specail characters also ... I am just sending the search text as a query string to my Search page
So I am encoding the special character to avoid 400 Bad request which takes as a illegal path characters . So i am ok with encoding.... but my main problem is that when I tried to search like

Search Keyword : Product33%

Encoded : Product33[%25]

Results : Search executed well and prodcuts listed out at first search attempt

Url Path : "....Search/Product33[%25]"

without refreshing the page i gave another search word

Search Keyword : PenDrives

Encoded : PenDrives

Results : HTTP Error 400. The request URL is invalid.

Url Path : "....Search/[%]"

first search is working fine with "%" and when i tried to search on another search key the page is error ed out .... Remaing all cases are working fine except if we tried to search with %

Thanks in advance...
Posted

1 solution

As the URL is like...

Url Path : "....Search/[%]"

That means, you are not getting the value entered in the Search TextBox. Debug and find out what is the exact issue, due to which you are not getting the Search Box value in code behind.
 
Share this answer
 
v2
Comments
jing567 26-Jul-14 0:00am    
Hai,
I am able to get each and every value and i am able to find the correct built in URL also... The search is not working properly only after search on % related... rather than working finr
So, did you see what query it makes to search after you enter such % signs inside the search box?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900