Hello...
I am using the code below to display all controls on my page, however the result is only the parent controls(as follows):
System.Web.UI.ResourceBasedLiteralControl
System.Web.UI.HtmlControls.HtmlForm
System.Web.UI.LiteralControl
I do have textboxes on my page. I believe the textbox is a child of the HTML form control. Does anyone know how I can get to the child level of controls?
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myControl As Control
Dim controltype As String
For Each myControl In Page.Controls
controltype = myControl.GetType.ToString
Response.Write(controltype)
Next
Response.Write(controltype)
Response.Write("<br>"
Next
End Sub
I am using the code below to display all controls on my page, however the result is only the parent controls(as follows):
System.Web.UI.ResourceBasedLiteralControl
System.Web.UI.HtmlControls.HtmlForm
System.Web.UI.LiteralControl
I do have textboxes on my page. I believe the textbox is a child of the HTML form control. Does anyone know how I can get to the child level of controls?
Code:
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim myControl As Control
Dim controltype As String
For Each myControl In Page.Controls
controltype = myControl.GetType.ToString
Response.Write(controltype)
Next
Response.Write(controltype)
Response.Write("<br>"
Next
End Sub