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

VS 2010 [RESOLVED] Easier way to code this expression?

$
0
0
Code:

For Each ele As HtmlElement In WebBrowser1.Document.All
            If ele.GetAttribute("id").ToLower = "Image".ToLower Then
                ele.InvokeMember("click")
            End If
        Next

I was hoping to do something more like this to keep it short and simple:

Code:

WebBrowser1.Document.GetElementById("Input").SetAttribute("value", stVO)
So I tried this, but no matter what I tried after it, I couldn't get it working:

Quote:

WebBrowser1.Document.GetElementById("Input")
I am not sure how to make it "click" the element like it does in the first code, which I got off the net. Set attribute does not work, HtmlElement did not work, InvokeMember did not work. Any suggestions?

Viewing all articles
Browse latest Browse all 27554

Trending Articles



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