<html>
<body>

<form runat="server">
请输入介于 2005-01-01 到 2005-12-31 的日期:
<br />
<asp:TextBox id="tbox1" runat="server" />
<br /><br />
<asp:Button Text="验证" runat="server" />
<br /><br />
<asp:RangeValidator
ControlToValidate="tbox1"
MinimumValue="2005-01-01"
MaximumValue="2005-12-31"
Type="Date"
EnableClientScript="false"
Text="日期必须介于 2005-01-01 和 2005-12-31 之间!"
runat="server" />
</form>

</body>
</html>