2017-10-18 76 views
0

不工作我有我想要在我的web表单验证日期...范围验证在asp.net

这里是我使用的验证,但它似乎并没有工作。 ..

<asp:RangeValidator ID="rgBHPECoOcuuring" runat="server" ErrorMessage="Assessment Date must be greater than the Birth Date of the Patient and not in the future" 
ValidationGroup="save" ControlToValidate="dtAssessmentDate" Display="None" > 
</asp:RangeValidator> 

所以,我做的是我显示lbDOB一个DOB - 就是我希望做的是确保日期是不是在未来,必须至少比出生日期

更大

有没有想法?

+0

你缺少了'Type','MinimumValue'和'MaximumValue'。范围验证程序如何在没有范围的情况下进行验证。 – VDWWD

回答

0

这里很容易使用自定义验证器并实现onservervalidate处理程序。

CustomValidator