Zal
Zal

Reputation: 1

How to read HTML element with vb.net?

I want to read the e-mail address from this site.

I used this:

WebBrowser2.Document.GetElementById("email").GetAttribute(TextBox1.Text)

But its not really working. Can someone help me out please?

Upvotes: 0

Views: 567

Answers (2)

ASH
ASH

Reputation: 20302

Right-click > Inspect Element > input id="login"

So, perhaps your code will look something like this:

TextBox1.Text = WebBrowser1.Document.GetElementById("login").InnerText

Upvotes: 0

CruleD
CruleD

Reputation: 1173

You should be doing this:

WebBrowser2.Document.GetElementById("login").InnerText

to get "[email protected]"

Upvotes: 1

Related Questions