J
JohnZing
Hi,
i have a list of drop down lists.
The first one is populated with a Select Query
The Second one is populated with a select query where ParentID is the
first drop down list selected value
The Third.... and so on...
The problem is: How can I handle the events from the different drop down
lists?
My Code below only works when i click in the first drop down
Private WithEvents ddl As DropDownList
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
ddl = New DropDownList
ddl.AutoPostBack = True
' populate ddl code HERE
PH1.Controls.Add(ddl)
End Sub
Private Sub ddl_SelectedIndexChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles ddl.SelectedIndexChanged
ddl = New DropDownList
ddl.AutoPostBack = True
' populate ddl code HERE
PH1.Controls.Add(ddl)
End Sub
Thank You
i have a list of drop down lists.
The first one is populated with a Select Query
The Second one is populated with a select query where ParentID is the
first drop down list selected value
The Third.... and so on...
The problem is: How can I handle the events from the different drop down
lists?
My Code below only works when i click in the first drop down
Private WithEvents ddl As DropDownList
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
ddl = New DropDownList
ddl.AutoPostBack = True
' populate ddl code HERE
PH1.Controls.Add(ddl)
End Sub
Private Sub ddl_SelectedIndexChanged(ByVal sender As Object, ByVal e As
System.EventArgs) Handles ddl.SelectedIndexChanged
ddl = New DropDownList
ddl.AutoPostBack = True
' populate ddl code HERE
PH1.Controls.Add(ddl)
End Sub
Thank You