title: c# click on html button
body: <p>Im loading an external website in webbrowser control and trying to click a button:</p>
  
  <pre><code>&lt;input type="submit" name="btnSubmit" class="rlg-btn-primary" value="Save changes"/&gt;
  </code></pre>
  
  <p>whit this c# code:</p>
  
  <pre><code>var elems = webBrowser1.Document.GetElementsByTagName("INPUT");
  
  foreach (HtmlElement elem in elems)
  {
      if (elem.GetAttribute("value") == "Save changes")
      {
          elem.InvokeMember("click");
      }
  }
  </code></pre>
  
  <p>the problem is that nothing happens. no error message. the page just sits still and nothing happens. I believe the code is correct. any thoughts? thanks in advance.</p>