How can i save items in a listbox as an array? Is it possible?

I tried writing this in asp.net, (vb.net as background codes)
Dim nameArray(5) as string //make room for 5 elements in the array
Dim i as Integer

For i = 0 to Listbox1.Listcount -1
nameArray(i) = Listbox1.list(i) // assign a name to each index in the array
next


But ASP.NET cannot accept .list , help?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.