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. C#
  4. How to programmatically cause a button click?

How to programmatically cause a button click?

Scheduled Pinned Locked Moved C#
questiontutorial
3 Posts 3 Posters 6 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.
  • J Offline
    J Offline
    jmelgar
    wrote on last edited by
    #1

    I have a web form and would like to cause a button to be clicked under a certain condition. How do I (what's the syntax) programmatically cause a button click so that the user doesn't have to do it? :omg: Thanks all, in advance, for your reply!

    M V 2 Replies Last reply
    0
    • J jmelgar

      I have a web form and would like to cause a button to be clicked under a certain condition. How do I (what's the syntax) programmatically cause a button click so that the user doesn't have to do it? :omg: Thanks all, in advance, for your reply!

      M Offline
      M Offline
      Mike_V
      wrote on last edited by
      #2

      You should be able to call PerformClick on the button object.

      1 Reply Last reply
      0
      • J jmelgar

        I have a web form and would like to cause a button to be clicked under a certain condition. How do I (what's the syntax) programmatically cause a button click so that the user doesn't have to do it? :omg: Thanks all, in advance, for your reply!

        V Offline
        V Offline
        Vasudevan Deepak Kumar
        wrote on last edited by
        #3

        Hey, You can use JavaScript and call the button object .click() Is'nt it? Deepak Kumar Vasudevan http://deepak.portland.co.uk/

        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