C
crjunk
I have a droped a UserControl named "ReceivedRecord1" onto my web
form. Currently, I have been saving information typed in by the user
with the following code that is located in the CodeBehind page of my
Web Form.
For Each ctrl In Page.FindControl("ReceivedRecord1").Controls
If TypeOf (ctrl) Is TextBox Then
' yada yada yada
End If
Next
I have now moved this code from my web from the CodeBehind page to the
UserControl CodeBehind page. Once I moved the code over to the
UserControl, I changed the for statement to the following:
For Each ctrl In Me.Controls
If TypeOf (ctrl) Is TextBox Then
' yada yada yada
End If
Next
This new code seems to not be able to find the TextBoxes that are on
the UserControl. What do I need to replace the "Me.Controls" with in
order for the code to find TextBoxes inside the UserControl?
Thanks!
crjunk
form. Currently, I have been saving information typed in by the user
with the following code that is located in the CodeBehind page of my
Web Form.
For Each ctrl In Page.FindControl("ReceivedRecord1").Controls
If TypeOf (ctrl) Is TextBox Then
' yada yada yada
End If
Next
I have now moved this code from my web from the CodeBehind page to the
UserControl CodeBehind page. Once I moved the code over to the
UserControl, I changed the for statement to the following:
For Each ctrl In Me.Controls
If TypeOf (ctrl) Is TextBox Then
' yada yada yada
End If
Next
This new code seems to not be able to find the TextBoxes that are on
the UserControl. What do I need to replace the "Me.Controls" with in
order for the code to find TextBoxes inside the UserControl?
Thanks!
crjunk