On Sep 3, 10:36*am, Michael <michae...@gmail.comwrote:
Hi experts,
I am using axWebBrowser in windows form to load web pages.
There is a page that contains a group of buttons. (More than 10
buttons.)
The source code behind each button is like below:
<input type="submit" name="Submit" value="Submit"
onClick="afm.__act.value='
SITE.9.20081206A__id.30.AdminsSelected.adp.actRegi ster';return
SubmitOnlyOnce();">
that is, all the buttons have the same name and value, but different
onClick event.
My question is, I want to click one of the buttons, how can I do this
in AxWebBrowser?
Thank you.
Regards,
Michael
Try this:
Click the button normally on a browser like IE or Firefox, after
loading is completed: Copy the whole addressbar and try to navigate to
this by passing proper value of your html element field(eg: Value
coming from textbox)
AxWebBrowser.Navigate("wholeURLfromAddressBar")
To clarify better:
When you click search on Google homepage, you get a URL that points to
your search, you can invoke the search directly using absolute URL
like:
http://www.google.com/search?hl=en&q=vb&aq=f&oq=
....and where "vb" is your search term. And in your AxWebBrowser, you
can change this term to what you want.
Hope this helps,
Onur Guzel