HtmlAgilityPack – How to get the tag by Id?

If I understand correctly then:

HtmlAgilityPack.HtmlDocument document2 = new HtmlAgilityPack.HtmlDocument();
document2.Load(@"C:\try.html");

string tag = document2.GetElementbyId("yourid").Name;
string href = document2.GetElementbyId("yourid").GetAttributeValue("href", "");

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)