How do I remove the HTML code to obtain plain text ?,
Public string TextNoHTML (string Htmlstring) {// Delete the script Htmlstring = Regex. Replace (Htmlstring, @ "<script [^>] *?>. *? </Script> "," ", RegexOptions. ignoreCase); // delete HTML Htmlstring = Regex. replace (Htmlstring, @ "<(. [^>] *)> "," ", RegexOptions. ignoreCase); Htmlstring = Regex. replace (Htmlstring, @ "([/r/n]) [/s] +", "", RegexOptions. ignoreCase); Htmlstring = Regex. replace (Htmlstring, @ "-->", "", RegexOptions. ignoreCase); Htmlstring = Regex. replace (Htmlstring, @ "<! --. * "," ", RegexOptions. ignoreCase); Htmlstring = Regex. replace (Htmlstring, @ "& (quot | #34);", "/", RegexOptions. ignoreCase); Htmlstring = Regex. replace (Htmlstring, @ "& (amp | #38);", "&", RegexOptions. ignoreCase); Htmlstring = Regex. replace (Htmlstring, @ "& (lt | #60);", "<", RegexOptions. ignoreCase); Htmlstring = Regex. replace (Htmlstring, @ "& (gt | #62);", ">", RegexOptions. ignoreCase); Htmlstring = Regex. replace (Htmlstring, @ "& (nbsp | #160);", "", RegexOptions. ignoreCase); Htmlstring = Regex. replace (Htmlstring, @ "& (iexcl | #161);", "/xa1", RegexOptions. ignoreCase); Htmlstring = Regex. replace (Htmlstring, @ "& (cent |# 162);", "/xa2", RegexOptions. ignoreCase); Htmlstring = Regex. replace (Htmlstring, @ "& (pound | #163);", "/xa3", RegexOptions. ignoreCase); Htmlstring = Regex. replace (Htmlstring, @ "& (copy | #169);", "/xa9", RegexOptions. ignoreCase); Htmlstring = Regex. replace (Htmlstring, @ "& # (/d +);", "", RegexOptions. ignoreCase); // replace <and> to mark Htmlstring. replace ("<", ""); Htmlstring. replace (">", ""); Htmlstring. replace ("/r/n", ""); // return the string that removes the html Tag. return Htmlstring ;}