G
Guest
Hi,
I have a page with a repeater control that contains textboxes. I'm trying
to create a validation class that is called by my page. A method in this
class iterates through all the controls on the page. On encountering a
TextBox control, it looks at the ID to discern the field the TextBox
represents, and then creates the appropriate validation controls and adds
them to the page. The controlToValidate property of each validation control
is the ClientID of the current TextBox in question.
When I run the page I get an error such as: Unable to find control id
'SchoolsRepeater__ctl0_txtStudent_LastName' referenced by the
'ControlToValidate' property of ''.
Of course the same type of error will occur when I use the control.ID as the
controltovalidate property.
Currently this Validation class method is called on the page at the end of
the page_load method. I've also tried putting it in the OnInit method, to no
avail.
Suggestions? Thanks.
Jack.
I have a page with a repeater control that contains textboxes. I'm trying
to create a validation class that is called by my page. A method in this
class iterates through all the controls on the page. On encountering a
TextBox control, it looks at the ID to discern the field the TextBox
represents, and then creates the appropriate validation controls and adds
them to the page. The controlToValidate property of each validation control
is the ClientID of the current TextBox in question.
When I run the page I get an error such as: Unable to find control id
'SchoolsRepeater__ctl0_txtStudent_LastName' referenced by the
'ControlToValidate' property of ''.
Of course the same type of error will occur when I use the control.ID as the
controltovalidate property.
Currently this Validation class method is called on the page at the end of
the page_load method. I've also tried putting it in the OnInit method, to no
avail.
Suggestions? Thanks.
Jack.