Okay so this is my html line with the ID:
<id="accounttype" class=inline-block"><strong><?=$_SESSION['accounttype']?></strong><br>
this is what it grabs
of course though that turns into text
<?=$_SESSION['accounttype']?>
this is my vb.net code
TextBox4.Text = WebBrowser1.Document.GetElementById("accounttype").InnerText
When i run the program i get this error
Object reference not set to an instance of an object.
I don’t see an element with an ID of
accounttype. All I see is an element with an ID ofnewssite.GetElementByIdreturns the element who has an attributeidequal to whatever you pass it. For example:And the VB.NET Code:
You may not have included the code; but you should also make sure the WebBrowser has completely loaded its contents before trying to work with it.