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. Web Development
  3. ASP.NET
  4. Which button pressed

Which button pressed

Scheduled Pinned Locked Moved ASP.NET
questionalgorithms
6 Posts 2 Posters 0 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.
  • F Offline
    F Offline
    ffowler
    wrote on last edited by
    #1

    I apologize right off for asking this question but I am either searching wrong or it is too late in the day for me to get the idea. Please, if someone out there can extend a hand, I would greatly appreciate it. I have several buttons on my page, within a form and I would like each button to perform a specific action (show panels, hide panels, assign variables etc...) when pressed. On the post back, how do I find out which button was pressed so that I may perform the function required. A small snippet or a pointer to a article would work out fine. Again sorry and thanks.

    A 1 Reply Last reply
    0
    • F ffowler

      I apologize right off for asking this question but I am either searching wrong or it is too late in the day for me to get the idea. Please, if someone out there can extend a hand, I would greatly appreciate it. I have several buttons on my page, within a form and I would like each button to perform a specific action (show panels, hide panels, assign variables etc...) when pressed. On the post back, how do I find out which button was pressed so that I may perform the function required. A small snippet or a pointer to a article would work out fine. Again sorry and thanks.

      A Offline
      A Offline
      Abhijit Jana
      wrote on last edited by
      #2

      If you have button, then each and every button should have an OnClick Event. You need to perform the operation on the Click Event of that button. BTW, Are your creating button Dynamically ?

      Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

      F 1 Reply Last reply
      0
      • A Abhijit Jana

        If you have button, then each and every button should have an OnClick Event. You need to perform the operation on the Click Event of that button. BTW, Are your creating button Dynamically ?

        Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

        F Offline
        F Offline
        ffowler
        wrote on last edited by
        #3

        No, no, no..... It couldn't be that simple!!!! I use OnClick all the time. I knew I wasn't thinking straight. The buttons are not being generated dynamically. They are set a design time. I told you that I wasn't in my right mind. Thanks my friend.

        A 1 Reply Last reply
        0
        • F ffowler

          No, no, no..... It couldn't be that simple!!!! I use OnClick all the time. I knew I wasn't thinking straight. The buttons are not being generated dynamically. They are set a design time. I told you that I wasn't in my right mind. Thanks my friend.

          A Offline
          A Offline
          Abhijit Jana
          wrote on last edited by
          #4

          Let say, You have 3 button in your page, Bt1, Bt2, Bt3. and for each click you want to perform some operation. So what is the problem on that ?:confused:

          Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

          F 1 Reply Last reply
          0
          • A Abhijit Jana

            Let say, You have 3 button in your page, Bt1, Bt2, Bt3. and for each click you want to perform some operation. So what is the problem on that ?:confused:

            Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

            F Offline
            F Offline
            ffowler
            wrote on last edited by
            #5

            No problem now, you've helped me.

            A 1 Reply Last reply
            0
            • F ffowler

              No problem now, you've helped me.

              A Offline
              A Offline
              Abhijit Jana
              wrote on last edited by
              #6

              Great!

              Abhijit Jana | Codeproject MVP Web Site : abhijitjana.net Don't forget to click "Good Answer" on the post(s) that helped you.

              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