Alex Rivera | Logout

How can I decode HTML characters in C#?

Asked 2008-09-23T18:01:15.017
451

I have email addresses encoded with HTML character entities. Is there anything in .NET that can convert them to plain strings?

c#
Edit
Report

1 Answer

7

Use Server.HtmlDecode to decode the HTML entities. If you want to escape the HTML, i.e. display the < and > character to the user, use Server.HtmlEncode.

answered 2008-09-23T18:02:12.910

Your Answer