I have a validator which I can enable or disable using the following javascript:
<script type="text/javascript">
ValidatorEnable($("#<%=validator2.ClientID%>")[0], true);
</script>
How can I set this attribute of the validator using C# in the code behind?
I have tried using the following C# but it didn’t work:
validator2.Enabled = true;
What code do I need to use in the code behind to set ValidatorEnable = true for the Validator2 control? I have researched this on the net but couldn’t find how to do this.
You can change the
Validation Groupof the validator in code behind