469,934 Members | 2,756 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,934 developers. It's quick & easy.

How to click a button using axWebBrowser?

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
Sep 3 '08 #1
2 1991
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
Sep 3 '08 #2
Michael,

The AxWebbrowser is nothing more than IE which is in the Windows OS.

As you click it gives to the server some information in a viewstate, in
javaScript, in flash or whatever.

You cannot process that either in IE or in the Axwebbrowser. As ozul told
you can see at the resulting url and then access that with by instance
processstart

Cor
"Michael" <mi*******@gmail.comschreef in bericht
news:f5**********************************@s9g2000p rg.googlegroups.com...
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

Sep 4 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Matthias Kwiedor | last post: by
reply views Thread by beau | last post: by
reply views Thread by pmali | last post: by
7 posts views Thread by Doe | last post: by
4 posts views Thread by =?Utf-8?B?RGF2ZSBF?= | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.