After loading a page using webbrowser, attackers attempt to access its document, htmlelement, htmlelements, and other objects. There is always an exception: htmlelement nullreferenceexception was unhandled.
Finally, the following reasons are found on msdn:
When using the DOM throughWebbrowserControl, you shoshould always wait untilDocumentcompletedEvent occurs before attempting to accessDocumentProperty ofWebbrowserControl.DocumentcompletedEvent is raised after the entire document has loaded; if you use the DOM before then, you risk causing a run-time exception in your application.
In the form1_load function, I tried to access these page elements when the page was loaded. At this time, these pages are not loaded yet, so the result is always blank. SetCodeSwitch to the documentcompleted event.
This articleArticleThe address is: http://msdn.microsoft.com/en-us/library/ms171712.aspx