I am showing email message body in textbox which is containing html tags in it and showing all tags as it but i want to render it and show actual formatted text. The message body is a string type but was originally a html document sent in email.
Output I am getting:
What I want:
When I use:
body = System.Net.WebUtility.HtmlEncode(body);
TxtBodyText.Text = body;
Then it converts < and > to <, > etc but i wanna display formatted text. Also tried HtmlAgilityPack's Entitize method but no success. Is it possible to do so?
Please help!!