private void Display(string url) { try { Label1.Text = string.Empty; HtmlWeb web1 = new HtmlWeb(); HtmlDocument doc = web1.Load(url.TrimEnd('/')); doc.DocumentNode.Descendants().Where(n => n.Name == "script" && n.Name == "style" && n.Name == "link").ToList().ForEach(n => n.Remove()); foreach (HtmlNode value in doc.DocumentNode.SelectNodes(".//div[@*]")) { if (value.Id != "") { if (!dict.ContainsKey(value.Id)) { dict.Add(value.Id, value.Id); } } } if (dict.Count > 0) { foreach (string str in dict.Values) { HtmlNode inNode = doc.DocumentNode.SelectSingleNode("//div[(@*='" + str + "')]"); Label1.Text += inNode.InnerText.Trim() + "<html><br/></html>"; } } } catch (Exception ex) { Label1.Text = ex.Message; } }
Online Shopping Home » Mobile and Accessories » Landlines Mobile And Accessories Showing 1-24 of 84 Results Sort by: Relevancy Highest Price First Lowest Price First Most Recent First
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)