Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows Forms
  4. How to push submit button from code behind?

How to push submit button from code behind?

Scheduled Pinned Locked Moved Windows Forms
csharptutorialquestion
3 Posts 2 Posters 8 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    nikjoh
    wrote on last edited by
    #1

    Hi, I am working on a .net c# windows application in which I use a webBrowser control. In the control I open an external webpage that has a login page and I fill in the username and password from my code behind. But I don’t know how I push the login button or execute de page. Is there someone out there that can give me a hint of how to do that?

    K 1 Reply Last reply
    0
    • N nikjoh

      Hi, I am working on a .net c# windows application in which I use a webBrowser control. In the control I open an external webpage that has a login page and I fill in the username and password from my code behind. But I don’t know how I push the login button or execute de page. Is there someone out there that can give me a hint of how to do that?

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      First you need to know what the id is of the button you want to click. Then you have to get the object type it correctly and do the .click() method for that type. If you haven't already I would add a reference to the microsoft.mshtml.dll This will give you access to the mshtml namespace which has all of the objects you might want to use their types. Ben

      N 1 Reply Last reply
      0
      • K kubben

        First you need to know what the id is of the button you want to click. Then you have to get the object type it correctly and do the .click() method for that type. If you haven't already I would add a reference to the microsoft.mshtml.dll This will give you access to the mshtml namespace which has all of the objects you might want to use their types. Ben

        N Offline
        N Offline
        nikjoh
        wrote on last edited by
        #3

        Thank you Ben, I got it to work! :laugh: Sorry about the cross the cross post. Niklas

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups