By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,195 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

list of drop downs

P: n/a
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
Nov 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.