ASP.NET Custom Validator Error Message: Control referenced by the property cannot be validated
- by Jan-Frederik Carl
Hello, I use ASP.NET and have a Button and a CustomValidator, which has to validate
the button.
<asp:Button ID="saveButton" runat="server" OnClick="SaveButton_Click" Text="Speichern"
CausesValidation="true"/>
<asp:CustomValidator runat="server" ID="saveCValidator" Display="Static"
OnServerValidate="EditPriceCValidator_ServerValidate"
ControlToValidate="saveButton" ErrorMessage="">
When loading the page, I receive the error message:
"Control 'saveButton' referenced by the ControlToValidate property of 'saveCValidator' cannot be validated."
What might be the problem? I searched on the net, but this didn´t help much.