I have a string that include HTML tags <B> font etc. I want to Strip Html Tags to show the string as tooltip.
public static string StripHtmlTags(string html)
{
if(String.IsNullOrEmpty(html)) return "";
HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
doc.LoadHtml(html);
return doc.DocumentNode.InnerText;
}
posted @ Wednesday, January 16, 2008 10:47 AM