You need to update the
SelectionMode
property to
Multiple
to ensure that the users can select multiple values from the list. The default value for this is Single and that is what you are seeing as you only get the last one as selected.
<asp:ListBox id="ListBox1" runat="server" SelectionMode="Multiple">
<asp:ListItem Value=".89">apples</asp:ListItem>
<asp:ListItem Value=".49">bananas</asp:ListItem>
</asp:ListBox>
The code was taken from the following MSDN pages, you can try it out in your own code. If I understand correctly you might require to hold
CTRL key to select multiple values;
or maybe ASP.NET Web Forms stores that as well.
ListBox.SelectionMode Property (System.Web.UI.WebControls)[
^]
ListSelectionMode Enumeration (System.Web.UI.WebControls)[
^]