Error: 'Page_Validators' is undefined
-
I have a page where iam hiding a required validator inside a table for a certain textbox. getting this error 'Page_Validators' is undefined. i have added runat="server" for table and validator Any ideas why.
samerh wrote:
getting this error 'Page_Validators' is undefined
Is js error? did you set ControlToValidate to the textboxes?
Yusuf May I help you?
-
samerh wrote:
getting this error 'Page_Validators' is undefined
Is js error? did you set ControlToValidate to the textboxes?
Yusuf May I help you?
Yes a JS error and yes i set the control to validate N.B when i delete the required validator the error is gone below the code iam using, i have used it 100's of times:
<asp:TextBox ID="txtSubject" Width="300px" runat="server"></asp:TextBox><asp:RequiredFieldValidator
ID="ReqVal" Enabled="false" ControlToValidate="txtSubject" runat="server" ErrorMessage="Subject is required!"></asp:RequiredFieldValidator>JS:
var reqValue = document.getElementById('<%=ReqVal.ClientID%>');
if (FPchk.checked == true)
ValidatorEnable(reqValue, true);
else
ValidatorEnable(reqValue, false); -
I have a page where iam hiding a required validator inside a table for a certain textbox. getting this error 'Page_Validators' is undefined. i have added runat="server" for table and validator Any ideas why.
I'm facing the same problem.... Searched for the solution but in vain! :( [Update] I've found the solution! Just add a
<script type="text/javascript">
var Page_Validators = new Array();
</script>to the start of your page giving the error. And there you go!.....error solved.
-
I'm facing the same problem.... Searched for the solution but in vain! :( [Update] I've found the solution! Just add a
<script type="text/javascript">
var Page_Validators = new Array();
</script>to the start of your page giving the error. And there you go!.....error solved.