Tag Archives: decodeURIComponent

Javascript string encoding in C#

In a previous post I explained how you can use the C# System.Uri.EscapeDataString() to encode strings to be later decoded by the equvivalent JavaScript decodeURIComponent(). The method above is still valid when encoding HTML tags, but fails short when encoding … Continue reading

Posted in .net, c#, General .NET | Tagged , , , | 4 Comments

decodeURIComponent() equivalent in C#

The Javascript decodeURIComponent()  function decodes a string that was URI encoded with the encodeURIComponent() Javascript function. If you wish to encode a string in C# that can be decoded with decodeURIComponent you have to use the EscapeDataString function: The escaping … Continue reading

Posted in General .NET | Tagged , , | 7 Comments