
Legal Notice
The opinions expressed herein are my own personal opinions and do not represent my employer’s view in anyway.Top Posts
Archive
Meta
Tag Archives: EscapeDataString
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 decodeURIComponent, encoding, EscapeDataString, Javascript
2 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