Im trying to use the Win8-Searchbar for scan through a http-Server.
string uriString = "http://myServer:myPort/?ItemList,SQLFilter=Title LIKE '%" + searchTerm + "%'";
Uri uri = new Uri(uriString);
Special signs like “%”, ” “(Whitespace) are getting transformed to “%25”, “%20” …
How can I prevent these transformation? The http-Server doesn´t understand it 🙁
According to w3schools,
That’s why URL Encoding occurs and there’s no way to avoid it.
On the server side you need to use HttpUtility.UrlDecode to decode the string.
Not related to the problem, but extremely important:
Exposing something like
SQLFilter=Title LIKE '%" + searchTerm + "%'"in the URL represents a huge security issue. Anyone can modify that to run arbitrary statements on your DB.