Im using HTML Agility Pack, and Im trying to replace the InnerText of some Tags like this
protected void GerarHtml()
{
List<string> labels = new List<string>();
string patch = @"C:\EmailsMKT\" +
Convert.ToString(Session["ssnFileName"]) + ".html";
DocHtml.Load(patch);
//var titulos = DocHtml.DocumentNode.SelectNodes("//*[@class='lblmkt']");
foreach (HtmlNode titulo in
DocHtml.DocumentNode.SelectNodes("//*[@class='lblmkt']"))
{
titulo.InnerText.Replace("test", lbltitulo1.Text);
}
DocHtml.Save(patch);
}
the html:
<.div><.label id="titulo1" class="lblmkt">teste</label.><./Div>