An object-oriented programming language developed by Microsoft that can be used in .NET.
Something like this might be what you are looking for:
Public Shared Function CycleControls(ByVal Page As Control) As Boolean
'this function cycles through all the labels on a web form
Try
For Each ctrl As Control In Page.Controls
If TypeOf ctrl Is Label Then
CType(ctrl, Label).Text = CType(ctrl, Label).Text + 1
End If
Next
Return True
Catch
Return False
End Try
End Function