Tuesday, June 23, 2009

Remove HTML from string (Remove Manoli Code Format)

Earlier I have write blog post on how to format code and convert it into Html


This post will explain you How to remove HTML from String.

To Remove HTML from String you can make use of following function.


public string RemoveHTML(string strSource)
{
//Here strSource is string containing HTML Code
return Server.HtmlDecode(Regex.Replace(strSource, "<(.|\n)*?>", ""));
}

No comments:

Most Recent Post

Subscribe Blog via Email

Enter your email address:



Disclaimers:We have tried hard to provide accurate information, as a user, you agree that you bear sole responsibility for your own decisions to use any programs, documents, source code, tips, articles or any other information provided on this Blog.
Page copy protected against web site content infringement by Copyscape