Saturday, January 8, 2011

Get Multiple selected Items from Listbox in asp.net


There is no selecteditems method which returns listiem array. So here we can get the selectedindices and through index we can access the listbox selected item.


        Dim index() As Integer = Listbox1.GetSelectedIndices()
        For Each i In index
            MsgBox(Listbox1.Items(i).Value)
        Next

No comments:

Post a Comment