Dropdown click
-
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.
-
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.
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
-
Hi, First u need to set AutoPostBack=true, then u have to write Code for SelectIndexChanged event. Then only it will works. Bye Pessi.
-
Hi, First u need to set AutoPostBack=true, then u have to write Code for SelectIndexChanged event. Then only it will works. Bye Pessi.