Here's the code...
Public Sub CheckControls(ByVal Container As Object)
'call like this CheckControls(Page) to iterate through all controls (or just pass in a more specific object)
'write straight to page - bit old fashioned - could build a string and set a label.text
Response.Write("")
Dim ctl As Control
For Each ctl In Container.Controls
If ctl.HasControls Then 'be thorough, iterate child controls
CheckControls(ctl)
End If
If TypeOf ctl Is CheckBox Then 'pick out specific types and display properties of interest
Response.Write(Container.ID & " controls are ...
") 'indent
Dim ChkBox As CheckBox
ChkBox = ctl
Response.Write("ChkBox=" & ChkBox.ID & " checked=" & ChkBox.Checked)
Response.Write(vbCrLf)
ElseIf TypeOf ctl Is TextBox Then 'show it's ID and text values
Response.Write(Container.ID & " controls are ...
") 'indent
Dim TxtBox As TextBox
TxtBox = ctl
Response.Write("TextBox=" & TxtBox.ID & " text=" & TxtBox.Text)
Response.Write(vbCrLf)
Else 'just show it's ID
'Response.Write(ctl.ID & "|")
End If
Next
Response.Write("")
End Sub