Submitting a form navigated to using WebBrowser control

Posted on 2008-11-11
Last Modified: 2013-12-17
I am doing the old screen scraping technique to automate the manual retrieval of data some of our people do daily. I have the logon and password being entered in the the textboxes on the screen - but the submit button is an image which has no name or id property. I don't see any way I can click that button for them.  Is there a way to submit that form without clicking the image?  
Question by:CreditSoupTech
    1 Comment
    LVL 4

    Accepted Solution

    Found the answer myself.  The form had no name specified so I had to loop through all the elements till I found FORM.  Luckily the other two forms on this page did have names.  

     HtmlDocument doc = webBrowser1.Document;
                    elems = doc.All.GetElementsByName("");

                    if (elems != null && elems.Count > 0)
                        for (int i = 0; i < elems.Count; i++)

                                elem = elems[i];
                                if (elem.TagName.Equals("FORM"))

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Join & Write a Comment

    A basic question.. “What is the Garbage Collector?” The usual answer given back: “Garbage collector is a background thread run by the CLR for freeing up the memory space used by the objects which are no longer used by the program.” I wondered …
    Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    This video discusses moving either the default database or any database to a new volume.

    732 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now