I have a problem with a dropdownlist in ASP.Net
I want to capture the 'SelectedIndexChanged' event and populate a label or textbox on the page.
However the event does not fire when I make the selection in the listbox.
It only fires when I click another command button on the page.
I have read a couple of posts on Tek-Tips but I am still unclear what the problem is - is it connected with 'postback'?
This is what I am trying to do ...
Private Sub lstCustomerList_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstCustomerList.SelectedIndexChanged
' get the selected value
Dim currItem As String = lstCustomerList.SelectedItem.ToString()
' populate the label
lblFullCustomerName.Text = currItem
End Sub
Any help appreciated...
Thanks!
I want to capture the 'SelectedIndexChanged' event and populate a label or textbox on the page.
However the event does not fire when I make the selection in the listbox.
It only fires when I click another command button on the page.
I have read a couple of posts on Tek-Tips but I am still unclear what the problem is - is it connected with 'postback'?
This is what I am trying to do ...
Private Sub lstCustomerList_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lstCustomerList.SelectedIndexChanged
' get the selected value
Dim currItem As String = lstCustomerList.SelectedItem.ToString()
' populate the label
lblFullCustomerName.Text = currItem
End Sub
Any help appreciated...
Thanks!