using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Windows.Forms; namespace WindowsFormsApplication1 { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { webBrowser1.Navigate("http://w...content-available-to-author-only...m.com/rental/-/detail/=/cid=n_605gnbr2882r/"); } private void button2_Click(object sender, EventArgs e) { HtmlElementCollection elemnts1 = webBrowser1.Document.Body.GetElementsByTagName("div"); //List elemnts2 = new List(); foreach (HtmlElement elemnt in elemnts1) { string s = elemnt.GetAttribute("className"); if (String.IsNullOrEmpty(s) || !s.Equals("hd-gnav com")) continue; //elemnts2.Add(elemnt); elemnt.OuterHtml = ""; } //this.Text = elemnts2.Count.ToString(); } } }