Click Button Just By Value Of It
What exactly does this code do?
Code:
Private Function GetBtnByValue(ByVal value As String) As HtmlElement
For Each d As HtmlElement In Webbrowser1.Document.GetElementsByTagName("input")
If (d.GetAttribute("type").ToLower = asd.Text Or d.GetAttribute("type").ToLower = "submit") Then
If (d.GetAttribute("value") = value) Then
Return d
Exit For
End If
End If
Next
End Function
Private Sub ToolStripButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripButton1.Click
GetBtnByValue("go").InvokeMember("Click")
End Sub
