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. Dropdown click

Dropdown click

Scheduled Pinned Locked Moved ASP.NET
tutorialquestion
7 Posts 3 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.
  • R Offline
    R Offline
    ravihd
    wrote on last edited by
    #1

    How to check dropdown list click event ???

    A P 2 Replies Last reply
    0
    • R ravihd

      How to check dropdown list click event ???

      A Offline
      A Offline
      anarayan
      wrote on last edited by
      #2

      Use selectedindex_changed event

      R 1 Reply Last reply
      0
      • A anarayan

        Use selectedindex_changed event

        R Offline
        R Offline
        ravihd
        wrote on last edited by
        #3

        Does't Work not getting clicked when i select any item of dropdown list

        A 1 Reply Last reply
        0
        • R ravihd

          Does't Work not getting clicked when i select any item of dropdown list

          A Offline
          A Offline
          anarayan
          wrote on last edited by
          #4

          You have to add a handler to trigger the event: (code below is in VB) AddHandler CType(FindControl("YourDropDrown), DropDownList).SelectedIndexChanged, AddressOf TakeAction "YourDropDown" is the ID of your dropdown box and "TakeAction" will be an event procedure that you have to do whatever you need to do when the index changes.

          R 1 Reply Last reply
          0
          • A anarayan

            You have to add a handler to trigger the event: (code below is in VB) AddHandler CType(FindControl("YourDropDrown), DropDownList).SelectedIndexChanged, AddressOf TakeAction "YourDropDown" is the ID of your dropdown box and "TakeAction" will be an event procedure that you have to do whatever you need to do when the index changes.

            R Offline
            R Offline
            ravihd
            wrote on last edited by
            #5

            Nope, its not working i am using asp.net. This is the code which i am using. AddHandler CType(FindControl("drptest"), DropDownList).SelectedIndexChanged, AddressOf drpTest_SelectedIndexChanged Private Sub drpTest_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles drpTest.SelectedIndexChanged ShowBox("I am here") End Sub

            1 Reply Last reply
            0
            • R ravihd

              How to check dropdown list click event ???

              P Offline
              P Offline
              Prasad Babu A
              wrote on last edited by
              #6

              Hi, First u need to set AutoPostBack=true, then u have to write Code for SelectIndexChanged event. Then only it will works. Bye Pessi.

              R 1 Reply Last reply
              0
              • P Prasad Babu A

                Hi, First u need to set AutoPostBack=true, then u have to write Code for SelectIndexChanged event. Then only it will works. Bye Pessi.

                R Offline
                R Offline
                ravihd
                wrote on last edited by
                #7

                Thanks for your prompt help :)

                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