A neat regular expression function to strip the passed string of all HTML Tags.

public static string StripHTML ( string value )
{    
    // Strip the html tagstring    
    pattern = "<(.|\n)+?>";     
    string strOutput = string.Empty;      

    Regex regex = new Regex ( pattern, RegexOptions.IgnoreCase );
    // Replace all HTML tag matches with an empty     
    stringstrOutput = regex.Replace(value, string.Empty);     
    // Replace all < and > with &lt; and &gt;     
    strOutput = strOutput.Replace("<", "&lt;");     
    strOutput = strOutput.Replace ( ">", "&gt");     

    return strOutput; 
}