进出口使用HTML敏捷性包,和我试着去更换的innerText一些标签像这样的更改标记的innerText与HTML敏捷性包
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);
}
的HTML:
<.div><.label id="titulo1" class="lblmkt">teste</label.><./Div>
我试过了,但是我收到了HtmlAgilityPack.InnerText它只是准备好了 – 2012-02-16 13:23:23
对不起 - InnerText是只读的。改为尝试文字。 – Matthias 2012-02-16 13:25:27