進出口使用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