Search code examples
stringsilverlighthttpcontexthtml-encode

Can you do HtmlDecode & HtmlEncode in Silverlight?


So since System.Web & HttpContext isn't available in Silverlight is there a way to do HtmlDecode & HtmlEncode inside a Silverlight app without some horrendous Regex?


Solution

  • System.Windows.Browser has an HttpUtility class with HtmlEncode and HtmlDecode methods.