UrlEncode should be used when creating the URL.
If the URL is not correctly encoded in the request, there is nothing you
can do to correct it when it arrives at the server side.
Although it might be possible that the browser encodes the characters
correclty, but they are decoded incorrectly when the request arrives.
Check the RequestEncoding property in web.config.
Are you really expecting your users to type in the URL and modify the
querystring? Are they aware of how to write things in an URL, basic
things like that they have to encode spaces?
Dariusz Tomon wrote:
"Göran Andersson" <gu***@guffa.com> wrote in message
news:eh**************@TK2MSFTNGP05.phx.gbl... You have to url-encode the value to put it in an url. Use the
Server.UrlEncode method.
It does not work or I did not understand.
I'm passing values by entering the string with "?" marks with values
assigned. Then I'm trying to retrieve value of "branza" and I tried like
this:
Server.UrlDecode(Request.QueryString["branza"]) and
Server.UrlEncode(Request.QueryString["branza"])
I cannot encode my entering string because it is www adres as it is - for
users to enter it just to browser and then my code underneath will generate
page depending on the values passed.
So the problem still exists :(
Regards
Darek T.
Dariusz Tomon wrote: Hi
My problem is like that:
I'm trying to pass values branza and jezyk in querysting:
http://localhost/euroadres/pokazbran...anza=transport
lotniczy&jezyk=1
Branza is type "string" and when I'm passing string value without
national characters it's working ok. When I'm trying to pass value with
national characters (multinational not only polish) it's not working
properly.
I debugged it and it occured that "multinational" characters are ingnored
or substituted for another characters.
My codepage: 65001 (UTF-8 with signature)
Have you got any idea?
Best Regards
Darek T.