in my aspx page I have
<asp:listbox class="myClass" id="lbFamilies" OnSelectedIndexChanged="lbFamilies_SelectedIndexChanged" runat="server" SelectionMode="Multiple"
Height="137px" AutoPostBack="True" EnableViewState="True"></asp:listbox>
And the following is in my codebehind
Protected Sub lbFamilies_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs)
What I am trying to do is to get the text from the selected element, but I can't figure out how to do this
You just have to use the
listbox.SelectedItem.Textproperty:Then you have to use a loop:
or with a LINQ one-liner: