473,382 Members | 1,202 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

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 2098
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: sophocles the wise | last post by:
automatically post data & click buttons on sequence of web pages with AxWebBrowser Hi, I need to post stuff everyday to a website and am working on a VB program to do this for me. I am a...
0
by: Matthias Kwiedor | last post by:
I have a aplication which hosts an axWebbrowser. This activex component needs about 10 to 15 mb of memory. Because i have a option to move the aplication to tray icon and do some timer work i...
0
by: beau | last post by:
Hi, I'm using the AxWebBrowser in a C# WinForms application. I've got the basics working, but need some help controlling the view options for browsing files. How can I disable the...
24
by: ej1002 | last post by:
Hi I have developed a Windows Application(C# Windows Form) which will get the IFrame Source of the page it is navigating using Webbrowser Control. Now I want do this in ASP.Net web application(C#...
3
by: MeNotHome | last post by:
I am trying to automate web browser navigation and form fill out in vb.net Why doesn't this work? AxWebBrowser1.Document.Forms(0).All("action-download").click() I also tried...
0
by: pmali | last post by:
I am using AxWebbrowser control. I first use the navigate(about:blank) method to load the htmldoc. After that anytime I click on links inside the axwebbrowser(eg yahoo.com) I am sent to...
7
by: Doe | last post by:
Okay, I've given up on using the "new" WebBrowser in 2005 to do what I want to do -- tabbed browsing. It seems I really need RegisterAsBrowser and Application to get each instance of a browser...
0
by: sagar.jawale | last post by:
Hi, In my c# windows application, i am using AxSHDocVw.AxWebBrowser. I am displaying a generated receipt html in this browser. Also, for printing the same html, i am using the following command...
4
by: =?Utf-8?B?RGF2ZSBF?= | last post by:
I have written an application that reads third party web pages. If I am using HTTP everything works fine. I create an AxSHDocVw.AxWebBrowser object and then Navigate2 to the page. I then...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.