title: check if HTMLElement exists in Document in webbrowser control (vb.net)
body: <p>I am trying to get the HTML inside a HTMLElement which has an id "block".
  I have tried:  </p>
  
  <pre><code>If webbrowser1.document.getelementbyid("block") isnot nothing then
    MsgBox(webbrowser1.document.getelementbyid("block").innerHTML)
  end if
  </code></pre>
  
  <p>But it keep throwing a NullReferenceException and tells me to check if it null/nothing which is what I'm doing.</p>
  
  <p>So how do I check if an element in a HTMLdocument with a certain ID exists?</p>