FederalProgrammer
Programmer
this must be super easy for one of u to answer:
I have a list box.
I add items to this listbox dynamically.
I capture the "SelectedIndex_Changed" event of this listbox.
The event is raised and handled once the user clicks on the listbox to select one of the items.
I've made sure AutoPostBack is set to true.
The problem is this:
When the event is handled myListbox.SelectedIndex = -1!! We all know what that means! Also, whenever the user clicks on the listbox, the item inside the listbox doesn't get selected?!!
---------------
I have a list box.
I add items to this listbox dynamically.
I capture the "SelectedIndex_Changed" event of this listbox.
The event is raised and handled once the user clicks on the listbox to select one of the items.
I've made sure AutoPostBack is set to true.
The problem is this:
When the event is handled myListbox.SelectedIndex = -1!! We all know what that means! Also, whenever the user clicks on the listbox, the item inside the listbox doesn't get selected?!!
---------------