Removing Html tags

How to remove the html tags from the string.

Code-Behind :

public static string RemoveHTMLRegex(string strHTML)
{
string tmpHTML = Regex.Replace(strHTML, “<br />”, ” <br />”);
return Regex.Replace(strHTML, “<.*?>”, string.Empty);
}

namespace :

using System.Text.RegularExpressions;

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.