Wednesday, January 21, 2009

To Convert HTML Text to Normal Text

Hi,

If you want to remove the html tag from the text and replace as normal text use the following coding in Javascript.
using
System.Text.RegularExpressions;

private string StripTags(string HTML)
{
// Removes tags from passed HTML
Regex objRegEx = new Regex("<[^>]*>");
return objRegEx.Replace(HTML, "");
}

No comments: