Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello how to click this button on webbrowser using VisualBasic 2010?
<div class="d-k-l b-c b-c-Ba qy jt b-c-da-ja" guidedhelpid="sendbutton" role="button" style="-moz-user-select: none;" aria-disabled="false" tabindex="0">Send</div>
Posted
Comments
Sinisa Hajnal 4-Sep-14 4:37am    
How to click...point the mouse and press the button :p

Seriously: Do you mean you need server side event? To do some server side work? If yes, you should use button or input type="button" element, or asp:LinkButton or any of the myriad other controls that can "naturally" be clicked. If you absolutely have to use div, use runat="server" give it ID and access it on the server side normally.

In general, you use server controls to do work in server side language. That is, use
Send


Better solution is to use one of the controls that are buttons or anchors asp:Button, asp:LinkButton, asp:Hyperlink etc...
 
Share this answer
 
I found the answer
VB
Dim allelements As HtmlElementCollection = WebBrowser1.Document.All
For Each webpageelement As HtmlElement In allelements
    If webpageelement.GetAttribute("guidedhelpid") = "sendbutton" Then
        webpageelement.InvokeMember("click")
    End If
Next
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900