N
Nathan Sokalski
I have a validator that I wrote by inheriting from BaseValidator. At certain
points in the code, I need to access other controls on the page containing
the validator. I have the IDs of these controls, so I use the following
statement to access them:
Me.Page.FindControl(ControlID)
However, this is returning Nothing, even though the control can be accessed
in the Load event of the Page containing the control and the validator. I
also want to mention that the Page uses a Master Page, and the control and
validator are declared in the Page, not the Master Page. I am not sure if
this makes a difference or not. Can someone tell me what I am doing wrong?
Thanks.
points in the code, I need to access other controls on the page containing
the validator. I have the IDs of these controls, so I use the following
statement to access them:
Me.Page.FindControl(ControlID)
However, this is returning Nothing, even though the control can be accessed
in the Load event of the Page containing the control and the validator. I
also want to mention that the Page uses a Master Page, and the control and
validator are declared in the Page, not the Master Page. I am not sure if
this makes a difference or not. Can someone tell me what I am doing wrong?
Thanks.