Visual Studio 2005
Visual Basic.net
Windows Application
I need to simply return a selected item text value in a listview to a textbox when an item is clicked.
I am populating the ListView with a simple file collection.
The following code works ONCE,. then when I click on another item in the listview, I get an index error.
Code:
TextBox1.Text = ListView1.SelectedItems(0)
.ToString
Error is:
"InvalidArgument=Value of '0' is not valid for 'index'. Parameter name: index"
I would also like to loop through multiple selections but first need to return one...
Start Free Trial