开发者

howto get access to list view labels when i submit the page?

开发者 https://www.devze.com 2023-01-11 11:10 出处:网络
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 an开发者_如何学JAVAd i want to read out eac

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 an开发者_如何学JAVAd i want to read out each of this labels when i push the submit button


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
0

精彩评论

暂无评论...
验证码 换一张
取 消