Input type button?
how can I click this button? what code should I write? (I want to click this button with input type code... (not value)
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sam HobbsPosted Feb 2, 2012, 10:40 PM
Then you need to be able to find that button; the input tag/element. There are various ways to do that and the answer depends on the document. Since the tag does not have an id, you must find something else. You might be able to find the form and then the button in the form, but I am not sure of the details. It really depends on the document. Perhaps you can get all the input elements and hopefully the document has only one with the attribute "submit".
Once you have the button, you can cast the object to a mshtml.HTMLInputElementClass object. You might need to get the "DomDocument" for the button. The details of what you need to do depends on how you find the button. When you have the mshtml.HTMLInputElementClassfor the button, then it is simply a matter of calling the click method.
As an editor for this web site, I have written a tool to help me with editing. My tool clicks a button in the manner I describe above. I use it about a dozen times a day.
I can help, but please spend some time learning about these things.
Csharp NinjaPosted Feb 2, 2012, 9:16 PM
yes sam hobbs I want the code for WebBrowser control in C# project..
Thanks
Sam HobbsPosted Feb 2, 2012, 7:08 PM
Jignesh, your requirements are probably different so you need to create a different thread.
Jignesh TrivediPosted Feb 2, 2012, 12:39 AM
is there any restriction not use asp server control?
as per me use asp server control..
otherwise form has post method use it..
something like...
\
hope this help.
Satyapriya NayakPosted Feb 1, 2012, 10:33 PM
Try this...
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm2.aspx.vb" Inherits="Test.WebForm2" %>
Thanks