title: Get Captcha Image from Web Browser control without using SRC
body: <p>I know this question might sound familiar and there are plenty of posts out there on google with the same title BUT trust me this is different.</p>
  
  <p><strong>Editor</strong> : VS2008 (cannot upgrade it due to some technical difficulties)</p>
  
  <h2>Question</h2>
  
  <p>How to get <strong>Captcha Image</strong> from a <strong>Web Browser</strong> without using <strong>SRC</strong>?</p>
  
  <h2>Why wouldn't you use SRC?</h2>
  
  <p>Here is the site from which i am trying to get my <strong>Captcha Image</strong>
  <a href="https://services.gst.gov.in/services/login" rel="nofollow noreferrer">https://services.gst.gov.in/services/login</a> <br>
  (The capta image appears once you type anything in User Name)</p>
  
  <p>Now if you right click on the <strong>Captcha Image</strong> and go to inspect element you will see that the <strong>SRC</strong> of the captcha is:-</p>
  
  <p><a href="https://i.stack.imgur.com/FLQCB.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FLQCB.png" alt="enter image description here"></a></p>
  
  <p><a href="https://services.gst.gov.in/services/captcha?rnd=0.5313315062651027" rel="nofollow noreferrer">https://services.gst.gov.in/services/captcha?rnd=0.5313315062651027</a></p>
  
  <p>and whenever you try to go to that link it will give you a captcha that is different from the previous one. That is why i cant use the below code because it shows different captcha than the one showing in the <strong>WebBrowser</strong> right now.</p>
  
  <pre><code>HtmlElement element = webBrowser1.Document.GetElementById("imgCaptcha");
  string src = element.GetAttribute("src");
  pictureBox1.Load(element.GetAttribute("src"));
  </code></pre>