<html> <body> <form runat="server"> Enter a date between 2005-01-01 and 2005-12-31: <asp:TextBox id="tbox1" runat="server" /> <asp:Button Text="Submit" runat="server" /> <asp:RangeValidator ControlToValidate="tbox1" MinimumValue="2005-01-01" MaximumValue="2005-12-31" Type="Date" EnableClientScript="false" Text="The date must be between 2005-01-01 and 2005-12-31!" runat="server" /> </form> </body> </html>