<%@ Page language="c#" Codebehind="ValidPart.aspx.cs" AutoEventWireup="false" Inherits="Samples.ValidPart" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
  <HEAD>
		<title>控制页面部分验证控件有效示例</title>
</HEAD>
<body>
	<form runat=server>
			<table cellSpacing="0" cellPadding="0" width="100%" border="0">
				<tr>
					<td vAlign="top" width="206">
						<!-- Left Panel -->
						<table height="307" cellSpacing="11" cellPadding="0" width="300" border="1">
							<tr vAlign="top">
								<td>
									<p ><STRONG>添加图书数据</STRONG></p><FONT size=2>选择类别（可以多选）</FONT>
									<br>
										<asp:listbox id="CatalogList1" runat="server" SelectionMode="Multiple" CssClass="standard-text" Width="270px" Height="80px" rows="8">
										<asp:ListItem Value=0>计算机类</asp:ListItem>
										<asp:ListItem Value=1>经管类</asp:ListItem>
										<asp:ListItem Value=2>社科类</asp:ListItem>
										<asp:ListItem Value=3>教材类</asp:ListItem>
										<asp:ListItem Value=4>儿童读物类</asp:ListItem>
										</asp:listbox>
										<br>
										<asp:requiredfieldvalidator id="CatalogListRequiredFieldValidator1" runat="server" Width="267px" ErrorMessage="至少要选择一个类别！" ControlToValidate="CatalogList1" Display="Dynamic"></asp:requiredfieldvalidator>
										<br>
										<FONT size=2>书名</FONT>
										<br>
										<asp:TextBox id=ItemName1 runat="server"></asp:TextBox>
										<br>
										<asp:requiredfieldvalidator id="ItemNameRequiredFieldValidator1" runat="server" Width="267px" ErrorMessage="物品名称不能为空！" ControlToValidate="ItemName1" Display="Dynamic"></asp:requiredfieldvalidator>
										<br>
										<FONT size=2>数量</FONT>
										<br>
										<asp:TextBox id="ItemNum1" runat="server"></asp:TextBox>
										<br>
										<asp:requiredfieldvalidator id="ItemNumRequiredFieldValidator1" runat="server" Width="267px" ErrorMessage="物品数量不能为空！" ControlToValidate="ItemNum1" Display="Dynamic"></asp:requiredfieldvalidator>
										<br>
										<asp:comparevalidator id="ItemNumCompareValidator1" runat="server" ErrorMessage="物品数量必须为整数！" ControlToValidate="ItemNum1" Display="Dynamic" Operator="DataTypeCheck" Type="Integer"></asp:comparevalidator>
										<br>
										<asp:button id="AddItem" runat="server" CssClass="standard-text" Text="添加物品" CausesValidation="False"></asp:button>
								</td>
							</tr>
						</table>
						<!-- End Left Panel -->
					</td>
					<td width="20"></td>
					<td vAlign="top">
						<!-- Right Panel -->
						<table height="307" cellSpacing="11" cellPadding="0" width="300" border="1">
							<tr vAlign="top">
								<td>
									<p><STRONG>检索图书数据</STRONG></p><FONT size=2>选择类别（可以多选）</FONT>
										<asp:listbox id="CatalogList2" runat="server" SelectionMode="Multiple" CssClass="standard-text" Width="270px" Height="80px" rows="8">
										<asp:ListItem Value=0>计算机类</asp:ListItem>
										<asp:ListItem Value=1>经管类</asp:ListItem>
										<asp:ListItem Value=2>社科类</asp:ListItem>
										<asp:ListItem Value=3>教材类</asp:ListItem>
										<asp:ListItem Value=4>儿童读物类</asp:ListItem>
										</asp:listbox>
										<br>
										<asp:requiredfieldvalidator id="CatalogListRequiredFieldValidator2" runat="server" Width="267px" ErrorMessage="至少要选择一个项目！" ControlToValidate="CatalogList2" Display="Dynamic"></asp:requiredfieldvalidator>
										<br>
										<FONT size=2>书名</FONT>
										<br>
										<asp:TextBox id=ItemName2 runat="server"></asp:TextBox>
										<br>
										<asp:requiredfieldvalidator id="ItemNameRequiredFieldValidator2" runat="server" Width="267px" ErrorMessage="物品名称不能为空！" ControlToValidate="ItemName2" Display="Dynamic"></asp:requiredfieldvalidator>
										<br>
										<asp:button id="SearchItem" runat="server" CssClass="standard-text" Text="检索物品" CausesValidation="False"></asp:button>
								</td>
							</tr>
						</table>
						<!-- End Right Panel -->
					</td>
				</tr>
			</table>
	</form>
</body>
</HTML>
