list of drop downs

Discussion in 'ASP .Net' started by JohnZing, Jan 30, 2005.

  1. JohnZing

    JohnZing Guest

    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
     
    JohnZing, Jan 30, 2005
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Davmagic .Com

    Need Script For Drop Downs

    Davmagic .Com, Oct 14, 2004, in forum: Perl
    Replies:
    0
    Views:
    453
    Davmagic .Com
    Oct 14, 2004
  2. =?Utf-8?B?TWlrZQ==?=

    dual drop downs

    =?Utf-8?B?TWlrZQ==?=, Mar 9, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    559
    =?Utf-8?B?VGltIFN0YWxs?=
    Mar 9, 2005
  3. BryanS
    Replies:
    0
    Views:
    429
    BryanS
    Mar 16, 2005
  4. =?Utf-8?B?Sm9lIER1bmxlYXZ5?=

    Fixed Header on a Data Grid using CSS - problem with Drop downs

    =?Utf-8?B?Sm9lIER1bmxlYXZ5?=, Oct 13, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    4,837
  5. jaysch
    Replies:
    0
    Views:
    1,245
    jaysch
    Apr 30, 2011
Loading...

Share This Page