views:

6

answers:

1

hi, how can i access the labels from a list view when i submit the page? for example i have a ListView with 5 items and each item contains a label calles Label1 and i want to read out each of this labels when i push the submit button

A: 

I assume that you want to read the labels on server and not on client:

        For Each item As ListViewDataItem In ListView1.Items
            Dim Label1 As Label = DirectCast(item.FindControl("Label1"), Label)
            Dim labeltext As String = Label1.Text
        Next
Tim Schmelter