Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27349

VS 2010 How to Get element by ID in this case?

$
0
0
Hi everyone!

I'm migrating from VB6 to VB.NET and I'm a trouble about webbroser using getelementbyid

My code in VB6:

Code:

browser.Document.All("usuario")(1).innertext
The "(1)" was to point to the second time "usuario" appers

But in VB.NET I don't know how to point to the find the second time "usuário" appers.

my VB.NET code:
Code:

webbrowser1.document.getelementbyid("usuario").setattribute("value", "Jorge")
But when tried to put (1) after ("usuario") an error appered.

PS1: I don't know the reason there's more than an elemento with the same name.
PS2: I'm sorry for my english.

Viewing all articles
Browse latest Browse all 27349

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>