我有以下代码:
<asp:TableCell>
<asp:Label Text="Date of Birth:" Runat="server" cssClass="EditLabel" ID="Label3"/>
</asp:TableCell>
<asp:TableCell>
<asp:Textbox id="txtDOB" Runat="server" EnableViewState="True"/>
<asp:CustomValidator ControlToValidate="txtDOB" ErrorMessage="Date of Birth is not Valid" Runat="server" OnServerValidate="CheckDOB">*</asp:CustomValidator>
</asp:TableCell>
<asp:TableCell>
函数定义为:
Protected Sub CheckDOB(ByVal source As Object, ByVal args As ServerValidateEventArgs)
....
End Sub
当我提交代码时,函数永远不会被击中。这里缺少什么?