Im using the following method to extract text form html:
public string getAllText(string _html) { string _allText = \"\"; try
You can do so using HtmlDocument class:
HtmlDocument
HtmlDocument doc = new HtmlDocument(); doc.LoadHtml(input); doc.DocumentNode.SelectNodes("//style|//script").ToList().ForEach(n => n.Remove());