|
What I want to do is populate a text box located right above the list box with the listbox's item selected, so I tried the following for the list box:
Private Sub listResource_SelectedIndexChanged
txtBox.Text = list.SelectedItem.ToString()
End Sub
The above code only populates the listbox's first item.
I do have "PostBack"=True for the listbox.
The whole picture of what I'm doing is populating two ddls before the listbox's SQL statement is built. Both the first and second ddls have "AutoPostBack"=True, and the first is built on Page_Load, while the second ddl is built on the first ddl Private Sub ddl1_SelectedIndexChange handler. The listbox is built on the second ddl Private Sub ddl2_SelectedIndexChage handler. The problem is when the listbox has an item that's selected, the postback happens, and the textbox populates with the first record, and not the one I selected!
|
|
|
|
|
|
|
// |