Posted on: 8/29/2014 2:19:30 PM | Views : 585

asp.net.4 2012 express web forms
using HtmlAgilityPack;


the HtmlDocument not set the new values 
HtmlDocument doc = new HtmlDocument(); doc.Load(sPath); doc.DocumentNode.SelectSingleNode("//" + eHtml.title.ToString()).InnerHtml = "xxxxxxxxxxx";//"<title>" + _newCmsObj.MetaTitle + "</title>"; // have no change string s1 = DocOld.DocumentNode.SelectSingleNode("//" + eHtml.title.ToString()).InnerHtml; //doc.Save(@"C:\Users\Y\Desktop\New folder\x.html"); using (System.IO.StreamWriter str = new StreamWriter(@"C:\Users\Y\Desktop\New folder\x.html")) { // the doc didnt update but on the old version. str.Write(doc.DocumentNode.OuterHtml); } so the title didn't get affected by the new valu ...

Go to the complete details ...