|
-
Sep 11th, 2006, 09:30 AM
#1
Thread Starter
PowerPoster
[2.0] invoke submit[resolved]
in a webbrowser control, how can I invoke a specific "submit" button? So if I have a button on the webpage its showing, and I know the name of it, how can I click on it as if I were?
Last edited by Techno; Sep 11th, 2006 at 01:08 PM.
-
Sep 11th, 2006, 10:00 AM
#2
Frenzied Member
Re: [2.0] invoke submit
you dont even need to submit the button itself, you can submit the form
jsut do document.MyFormName.submit()
-
Sep 11th, 2006, 10:07 AM
#3
Thread Starter
PowerPoster
Re: [2.0] invoke submit
actually I cannot find that at all, ive been through it, in the webbrowser control properties/code
-
Sep 11th, 2006, 10:41 AM
#4
Thread Starter
PowerPoster
Re: [2.0] invoke submit
ok to make it clear. If I have this code in an html page, and its showing in the webbrowser control:
<input type="image" src="images/home/submit.gif" value="submit" border="0">
I want to be able to click on it, as if I were clicking manually, but wish to do this programmatically using the webbrowser control in .NET 2.0
-
Sep 11th, 2006, 01:09 PM
#5
Thread Starter
PowerPoster
Re: [2.0] invoke submit[resolved]
resolved
simply get the elements by tag name of "Input", then go through each element, if the current element attribute value is "submit" then InvokeMember("click")
-
May 9th, 2009, 12:19 AM
#6
Banned
Re: [2.0] invoke submit[resolved]
can you give an example of that
-
May 9th, 2009, 02:38 AM
#7
Thread Starter
PowerPoster
Re: [2.0] invoke submit[resolved]
HtmlElements elements = this.webBrowserControl.GetElementsByTagName("Input");
foreach(HtmlElement currentElement in elements)
{
currentElement.InvokeMember("click");
}
-
Oct 20th, 2011, 11:26 AM
#8
Member
Re: [2.0] invoke submit[resolved]
so if have more button then how can click in what button i want ?
-
Oct 20th, 2011, 01:33 PM
#9
Thread Starter
PowerPoster
Re: [2.0] invoke submit[resolved]
thats what the foreach loop does.... goes through all the html elements and called the invokemember method for "click"
you need to find your elements which are buttons or explicitly find the button by id then do an invoke member
-
Oct 22nd, 2011, 08:53 AM
#10
Member
Re: [2.0] invoke submit[resolved]
If no one button have ID and how can do it ? You can give me a Exsample ? Thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|