我使用ASP.NET,有一个按钮和一个CustomValidator,需要验证该按钮。
<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="">
加载页面时,我收到以下错误消息:
“Control 'saveButton' referenced by the ControlToValidate property of 'saveCValidator' cannot be validated.”
可能的问题是什么?我在网上搜索了一下,但没有找到有效帮助。