Question

how can i convert an html-encoded string like the one below to a normal string? (it's Hello World)

mystr="Hello World";

i am using Windows phone sdk.

Was it helpful?

Solution 3

here another way to do it

 string  mystr = "Hello World";
        var arr = mystr.Split(';');
        string newMStr = string.Empty; 
        foreach (var s in arr)
        {
            string newS= s.Remove(0, 2);
           newMStr+= Convert.ToChar(int.Parse(newS));
        }

         //Print  NewMstr

OTHER TIPS

HtmlDecode in System.Net

Just give it the string you want to convert

http://msdn.microsoft.com/de-de/library/7c5fyk1k%28v=vs.110%29.aspx

In .NET 4

 System.Net.WebUtility.HtmlDecode(mystr)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top