Results 1 to 5 of 5

Thread: [RESOLVED] dropdownlist SelectionChange

Threaded View

  1. #1

    Thread Starter
    Fanatic Member drpcken's Avatar
    Join Date
    Apr 2004
    Location
    devenv
    Posts
    591

    Resolved [RESOLVED] dropdownlist SelectionChange

    I have some constant arraylists that are filled when a dropdownlist value is changed (based on the value of the DDL). When the first DDL is changed, I have a second DDL that binds to the values of the constant arraylist. However I ran the code and change the value of the ddl but it doesn't databind to the second DDL. Do I have to refresh the page? And if so how can I tell it to keep the selectedvalue of the first dropdownlist that was fires the SelectedIndexChanged event?

    VB Code:
    1. Private Sub ddlSection_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlSection.SelectedIndexChanged
    2.         If ddlSection.SelectedItem.Text = "500" Then 'this is the first ddl
    3.             'Section500
    4.             arrSection500.Clear()
    5.             arrSection500.Add("Select Form")
    6.             arrSection500.Add("500-10")
    7.             arrSection500.Add("500-10C")
    8.             arrSection500.Add("500-11")
    9.  
    10.             ddlForm.DataSource = arrSection500 'this is the second ddl i want to bind this arraylist to
    11.             ddlForm.DataBind()
    12.         End If

    THanks again!!
    Last edited by drpcken; Oct 21st, 2005 at 05:55 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width