我正在尝试将下拉列表中的每个项目添加到标签。任何猜测为什么它不起作用。感谢您的回答。
Dim labels(2) As Label
Public Sub AddItemsFromDropdownlistToLabel()
DefineLabels()
'Add Items From Dropdownlist1 to three lables
For Each item As Object In DropDownList1.Items
If LabelCount < 3 AndAlso LabelCount > 0 Then
labels(LabelCount).Text = item.ToString
End If
Next
End Sub
Public Sub DefineLabels()
labels(0) = label1
labels(1) = label2
labels(2) = label3
End Sub