e Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>值比较验证</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="width: 327px">
<tr>
<td align="center" colspan="2">
用户信息</td>
<td style="width: 41px">
</td>
</tr>
<tr>
<td style="font-size: 9pt; width: 60px">
姓名:</td>
<td style="font-size: 9pt; width: 118px">
<asp:TextBox ID="txtName" runat="server" Width="138px"></asp:TextBox></td>
<td style="font-size: 9pt; width: 87px">
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName"
ErrorMessage="姓名不能为空" SetFocusOnError="True"></asp:RequiredFieldValidator></td>
</tr>
<tr>
<td style="font-size: 9pt; width: 60px">
密码:</td>
<td style="font-size: 9pt; width: 118px">
<asp:TextBox ID="txtPwd" runat="server" TextMode="Password"></asp:TextBox></td>
<td style="font-size: 9pt; width: 87px">
</td>
</tr>
<tr>
<td style="font-size: 9pt; width: 60px">
确认密码:</td>
<td style="font-size: 9pt; width: 118px">
<asp:TextBox ID="txtRePwd" runat="server" TextMode="Password"></asp:TextBox></td>
<td style="font-size: 9pt; width: 87px">
<asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtPwd"
ControlToValidate="txtRePwd" ErrorMessage="确认密码与密码不匹配"></asp:CompareValidator></td>
</tr>
<tr>
<td style="font-size: 9pt; width: 60px">
</td>
<td style="font-size: 9pt; width: 118px">
<asp:Button ID="btnCheck" runat="server" Text="验证" /></td>
<td style="font-size: 9pt; width: 87px">
</td>
</tr>
</table>
</div>
</form>
</body>
</html>