Quantcast
Channel: vb.net click a javascript button - Stack Overflow
Viewing all articles
Browse latest Browse all 4

vb.net click a javascript button

$
0
0

I have a vb.net Windows form. In the form I am running a web browser control. I am trying to click on a button using vb code. I found this example of invoking a js function directly but I am not having any luck. How can I click a js button on VB

The html for the button is-

<input class="boldbutton" type="button" value="Verify"   onclick="this.form.knob.value='ReqVerify';this.form.verify.value=1;this.form.submit()">

My vb code is-

WebBrowser1.Document.InvokeScript("this.form.knob.value='ReqVerify';this.form.verify.value=1;this.form.submit()")

I am not sure where I am going wrong. After the submit button is pressed there is a log that displays on the web page showing the activity. I am not seeing any activity when running my script, only if I manually push the button from another browser (not the one in the windows form).


Viewing all articles
Browse latest Browse all 4

Latest Images

Trending Articles





Latest Images