range validator not working in asp.net

301 Views Asked by At

I have a date that I'm trying to validate in my web form...

here is the validator I'm using but it doesn't seem to work...

<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>

So what I do is I display a DOB in lbDOB - what I'm hoping to do is make sure that date is not in the future, and has to be at least greater than Birth Date

Any ideas?

1

There are 1 best solutions below

0
Ross Bush On

It would be easy to use a custom validator here and implement the onservervalidate handler.

CustomValidator