<%@ Page language="c#" Codebehind="ApplyRangeValidator.aspx.cs" AutoEventWireup="false" Inherits="ApplyRangeValidator.WebForm1" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
	</HEAD>
	<body>
		<h3><font face="宋体">RangeValidator 示例</font></h3>
		<p>
			<form runat="server" ID="Form1">
				<table bgcolor="#eeeeee" cellpadding="10">
					<tr valign="top">
						<td>
							<h5><font face="宋体">要检查的值:</font></h5>
							<asp:TextBox id="txtComp1" runat="server" />
						</td>
						<td>
							<h5><font face="宋体">数据类型：整型最小值 (1)，最大值 (10)</font></h5>
						</td>
						<td>
							<asp:Label id="lblOutput1" Font-Name="宋体" Font-Size="10.5pt" runat="server" />
						</td>
					</tr>
					<tr valign="top">
						<td>
							<h5><font face="宋体">要检查的值:</font></h5>
							<asp:TextBox id="txtComp2" runat="server" />
						</td>
						<td>
							<h5><font face="宋体">数据类型：日期最小值 (2000/1/1)，最大值 (2001/1/1)</font></h5>
						</td>
						<td>
							<asp:Label id="lblOutput2" Font-Name="宋体" Font-Size="10.5pt" runat="server" />
						</td>
					</tr>
					<tr valign="top">
						<td>
							<h5><font face="宋体">要检查的值:</font></h5>
							<asp:TextBox id="txtComp3" runat="server" />
						</td>
						<td>
							<h5><font face="宋体">数据类型：字符串最小值 (Aardvark)，最大值 (Zebra)</font></h5>
						</td>
						<td>
							<asp:Label id="lblOutput3" Font-Name="宋体" Font-Size="10.5pt" runat="server" />
						</td>
					</tr>
				</table>
				<asp:Button Text="验证" ID="ValidatorBtn" runat="server" />
				<asp:RangeValidator id="rangeValInteger" Type="Integer" ControlToValidate="txtComp1" MaximumValue="10" MinimumValue="1" runat="server" EnableClientScript="False" />
				<asp:RangeValidator id="rangeValDate" Type="Date" ControlToValidate="txtComp2" MaximumValue="2001/1/1" MinimumValue="2000/1/1" runat="server" EnableClientScript="False" />
				<asp:RangeValidator id="rangeValString" Type="String" ControlToValidate="txtComp3" MaximumValue="Zebra" MinimumValue="Aardvark" runat="server" EnableClientScript="False" />
				<br>
				<asp:Label id="lblOutput" Font-Name="宋体" Font-Size="10.5pt" runat="server" />
			</form>
		</p>
	</body>
</HTML>
