You can use the
Html Agility Pack[
^] for this:
using HtmlAgilityPack;
HtmlDocument doc = new HtmlDocument();
doc.LoadHtml("<u>This is a</u> <strong>HTML</strong> <em>text</em>!");
string textOnly = doc.DocumentNode.InnerText;
You can also use a regular expression:
string html = "This is a <strong id='anId'>HTML</strong> <em><u>text</u></em>.";
string textOnly = System.Text.RegularExpressions.Regex.Replace(html, "<(.+?)>", "");
Hope this helps.