Below code remove the HTML tag. It removes HTML tag from your string.
public string RemoveHtmlTag(string html, bool allowHarmlessTags)
{
if (html == null || html == string.Empty)
return string.Empty;
if (allowHarmlessTags)
return System.Text.RegularExpressions.Regex.Replace(html, "", string.Empty);
return System.Text.RegularExpressions.Regex.Replace(html, "<[^>]*>", string.Empty);
//return html;
}
public string RemoveHtmlTagSearch(string html)
{
if (html == null || html == string.Empty)
return string.Empty;
return System.Text.RegularExpressions.Regex.Replace(html, "<[^>]*>", string.Empty);
}
Hey nice story... I love the way you presented whole story, Thanks for sharing such a useful information with us software training institutes | Summer training in embedded
ReplyDelete