I am trying to set the enable attribute on a required field validator control from a function in my code behind. The below code seems to not be working. What am I missing? I am doing this so I can test my code behind validation and not have to go to all
required field validator controls to change the enable property to false etc.
<asp:RequiredFieldValidator ID="rfvRadTxtTimerName"
runat="server" ForeColor="Red"
ControlToValidate="txtTimerName"
ErrorMessage="* Email Address is a required field."
ValidationGroup="submitTimer"
Enabled=<%# (EnableOrDisableRequiredValidators() == true ? true : false) %>
Display="Dynamic" >
</asp:RequiredFieldValidator>
protected bool EnableOrDisa ...
Go to the complete details ...