c# - How to stop automatic url decode in Firefox & Safari? -
In my web application I want to transmit some values via the URL via the URL. Because I have some special characters, so I decided to sign my values so that my URL could not be broken. In IE and Opera, when I load my URL in a browser, they keep encoding but the URLs in Safari and Firefox are automatically decoded and my code breaks.
IE8 & amp; Opera an encoded value url default .aspx? Sid = % c5% a1D% 19% 5c% c2% a5) and is not automatically decoded.
In Firefox & amp; Safari price has been automatically decoded and it is clear by "default" such as Default.aspx? Sid = šD \ ¥)
The problem is that when I use HttpUtility.UrlDecode (request .xstring ["sid"]) in my code and in my webpage firefox or my code in safari Breaks ... Any ideas how to prevent autodetection?
You should not call HttpUtility.UrlDecode (Request.QueryString ["sid"]) < / Code>. Simply use the
request .QueryString ["sid"]
and leave decoding ASP.NET as needed.
Comments
Post a Comment