Use this snippet if you have to loop through a nested controls collection:
Sub LoopControls(ByVal cntrls As ControlCollection)
Dim Control As Control
Response.Write("<ol>")
Dim Index As Int32 = -1
For Each Control In cntrls
Index += 1
Response.Write("<LI>" & Control.GetType.ToString & " Index " & Index)
If Control.Controls.Count > 0 Then
LoopControls(Control.Controls)
End If
Next
Response.Write("</ol>")
End Sub