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.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Feb 1, 2012, 5:33 PM EST
Try this...
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm2.aspx.vb" Inherits="Test.WebForm2" %>
Thanks
Jignesh TrivediRank #16 · 50.3K reputationPosted Feb 1, 2012, 7:39 PM EST
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.
Sam HobbsRank #107 · 20.5K reputationPosted Feb 2, 2012, 2:08 PM EST
Jignesh, your requirements are probably different so you need to create a different thread.
Csharp Ninja96 reputationPosted Feb 2, 2012, 4:16 PM EST
yes sam hobbs I want the code for WebBrowser control in C# project..
Thanks
Sam HobbsRank #107 · 20.5K reputationPosted Feb 2, 2012, 5:40 PM EST
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.