T
tshad
I have the following listbox:
<asp:ListBox ID="Positions" SelectionMode="single" Rows="8" Width="600"
runat="server"/>
I also have the following traces:
trace.warn("Positions.SelectedValue = " & Positions.SelectedValue)
trace.warn("Positions.SelectedIndex = " & Positions.SelectedIndex)
I am getting
Positions.SelectedValue = 0.001767 0.001342
Positions.SelectedIndex = -1 0.001798 0.000030
If I select an item and want to send the value to a stored procedure, I am
finding the selection getting unselected, and therefore I get an error.
When it posts back it shows it unselected.
If I set the SelectionMode to "Multiple", it works fine. It will grab the
lowest selectedItem and use that. When it posts back whatever was selected
is still selected. Why is the "Single" mode not working?
Thanks,
Tom
<asp:ListBox ID="Positions" SelectionMode="single" Rows="8" Width="600"
runat="server"/>
I also have the following traces:
trace.warn("Positions.SelectedValue = " & Positions.SelectedValue)
trace.warn("Positions.SelectedIndex = " & Positions.SelectedIndex)
I am getting
Positions.SelectedValue = 0.001767 0.001342
Positions.SelectedIndex = -1 0.001798 0.000030
If I select an item and want to send the value to a stored procedure, I am
finding the selection getting unselected, and therefore I get an error.
When it posts back it shows it unselected.
If I set the SelectionMode to "Multiple", it works fine. It will grab the
lowest selectedItem and use that. When it posts back whatever was selected
is still selected. Why is the "Single" mode not working?
Thanks,
Tom