<%@ Page 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>
<tr>
<td>
<td>
<asp:ValidationSummary ID="ValidationSummary1" runat="server" />
<br />
用户ID:</td>
<td><input id="txtName" type="text" runat="server" /> </td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName" ErrorMessage="请输入密码">*
</asp:RequiredFieldValidator></td>
;
<br />
用户密码:<asp:TextBox ID="password" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="password" ErrorMessage="请输入密码">*</asp:RequiredFieldValidator>
<asp:CompareValidator ID="CompareValidator1" ControlToValidate="password" ControlToCompare="repassword" runat="server" ErrorMessage="两次密码输入不同">*</asp:CompareValidator><br />
再次输入密码:<asp:TextBox ID="repassword" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="repassword" ErrorMessage="请输入重复密码">*</asp:RequiredFieldValidator>
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" ControlToValidate="repassword" runat="server" ValidationExpression="[0-9]" ErrorMessage="输入必须为数字"></asp:RegularExpressionValidator><br />
<asp:Button id="Button1" runat="server" Text="验证" /></div>
</form>
</body>
</html>
|