title: Cannot get HTML Attributes from HTML file (C#/WinForms)
body: <p>I have the following code that I managed to come up with:</p>
  
  <pre><code>private void button1_Click(object sender, EventArgs e)
  {
      HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument();
      using (var o = new OpenFileDialog())
      {
          if (o.ShowDialog() == DialogResult.OK)
              doc.Load(o.FileName);
      }
  
  
      foreach (HtmlAgilityPack.HtmlAttribute att in doc.DocumentNode.Attributes)
      {
          label1.Text += Environment.NewLine +
              att.Name + " " + att.Value;
      }
  }
  </code></pre>
  
  <p>But it's not doing anything. There are no errors, no exceptions, and it compiles and runs. But, as you can see, from inside the foreach loop, it is supposed to keep adding found attributes and their values to the label1.Text control, but it isn't. Nothing happens!</p>
  
  <p>Am I doing something wrong? Can someone please help?</p>
  
  <p>Thank you</p>