title: C# Find and show html element in webBrowser
body: <p>I have this html document:</p>
  
  <pre><code>&lt;div class="link1"&gt;
  &lt;a href="#"&gt;link1&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;div class="link2"&gt;
  &lt;a href="#"&gt;link2&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;div class="link3"&gt;
  &lt;a href="#"&gt;link3&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;div class="link3"&gt;
  &lt;a href="#"&gt;link4&lt;/a&gt;
  &lt;/div&gt;
  
  &lt;div class="link5"&gt;
  &lt;a href="#"&gt;link4&lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want to show elements that specified with "link3" in webBrowser control by getting element by class name.</p>
  
  <p>This code works, but if we have two elements by same class name it show nothing!</p>
  
  <pre><code>        foreach (HtmlElement elm in webBrowser1.Document.All)
          if (elm.GetAttribute("className") == "link3")
          {
              HtmlDocument doc = webBrowser1.Document;
              doc.Body.InnerHtml = elm.InnerHtml;
          }
  </code></pre>