1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
Sub showControls(ByVal ctrMain As Control)
For Each ctr As Control In ctrMain.Controls
If ctr.ID <> "" Then
If (TypeOf ctr Is Label) Then
Response.Write("Lable: " & ctr.ID & "<br>")
ElseIf (TypeOf ctr Is DropDownList) Then
Response.Write("DropDownList: " & ctr.ID & "<br>")
ElseIf (TypeOf ctr Is CheckBox) Then
Response.Write("Checkbox: " & ctr.ID & "<br>")
ElseIf (TypeOf ctr Is Button) Then
Response.Write("Button: " & ctr.ID & "<br>")
ElseIf (TypeOf ctr Is LinkButton) Then
Response.Write("LinkButton: " & ctr.ID & "<br>")
Else
Response.Write(ctr.ID & "<br>")
End If
End If
Next
End Sub
|