I have 2 DropDownListboxes. both are based on a SQLDataSource control. When the value of one is changed, it acts as a filter on the other. The event fires fine, I change the filter on the SQLDataSource, but the list in the second DropDownList doesn t change.
I have been looking for an answer to this for hours and it s frustrating me greatly. It seems like it should be something simple like a requery command. The code in question is below.
Protected Sub DropDownList1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DropDownList1.SelectedIndexChanged
If Me.DropDownList1.SelectedValue > 0 Then
Me.SqlDataSource2.FilterExpression = "Arcft_Make_ID = " & Me.DropDownList1.SelectedValue
Else
Me.SqlDataSource2.FilterExpression = ""
End If
End Sub