I have a listview and its first column is Class ID.

On ListView1\_SelectedIndexChanged, that is on selecting each row, I want the variable ClassID to Store the value of Class ID.

What is the code that I have to use?

I tried ClassID = ListView1.Items.subitems(0).text, but it doesn't work.