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:
Private Sub ddlSection_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles ddlSection.SelectedIndexChanged If ddlSection.SelectedItem.Text = "500" Then 'this is the first ddl 'Section500 arrSection500.Clear() arrSection500.Add("Select Form") arrSection500.Add("500-10") arrSection500.Add("500-10C") arrSection500.Add("500-11") ddlForm.DataSource = arrSection500 'this is the second ddl i want to bind this arraylist to ddlForm.DataBind() End If
THanks again!!




Reply With Quote