First of all my application is not a web application. My aim is reading html files and modify them.
So that I write this code:
string fileName =
Install the HAP package:
Install-Package HtmlAgilityPack -Version 1.11.27
String:
// From String
string result =" "
Code:
var doc = new HtmlDocument();
doc.LoadHtml(result);
foreach (var node in doc.DocumentNode
.Descendants("div")
.Where(d => d.GetAttributeValue("Id", "RemoveableDiv").IndexOf("NavContent") >= 0)
.ToArray())
node.Remove();
result = doc.documentnode.innerhtml;