Hey.
I need to click this button in vb.net.

<button id="login" class="fblogin"></button>

How would I go about it?

Thanks.

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        Dim theElementCollection As HtmlElementCollection = WebBrowser1.Document.GetElementsByTagName("button")
        For Each curElement As HtmlElement In theElementCollection
            Dim controlName As String = curElement.GetAttribute("name").ToString
            controlName = "login"
                curElement.InvokeMember("click")
        Next

    End Sub
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.