<form id="form1" runat="server">
<div>
<table class="style1">
<tr>
<td class="style2">
用户名:</td>
<td class="style3">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1" ErrorMessage="请输入用户名"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style4">
密码:</td>
<td class="style5">
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</td>
<td class="style6">
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="TextBox2" ErrorMessage="请输入密码"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style2">
确认密码:</td>
<td class="style3">
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</td>
<td>
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="TextBox3" ControlToValidate="TextBox2" ErrorMessage="密码不一致"></asp:CompareValidator>
</td>
</tr>
<tr>
<td class="style4">
年龄:</td>
<td class="style5">
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
</td>
<td class="style6">
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="TextBox4" ErrorMessage="请输入年龄"></asp:RequiredFieldValidator>
<asp:RangeValidator ID="RangeValidator1" runat="server"
ControlToValidate="TextBox4" ErrorMessage="年龄在20到50之间 " MaximumValue="50"
MinimumValue="20" Type="Integer"></asp:RangeValidator>
</td>
</tr>
<tr>
<td class="style4">
月收入:</td>
<td class="style5">
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
</td>
<td class="style6">
<asp:CompareValidator ID="CompareValidator3" runat="server"
ControlToValidate="TextBox5" ErrorMessage="月收入应为整数" Operator="DataTypeCheck"
Type="Integer"></asp:CompareValidator>
</td>
</tr>
<tr>
<td class="style4">
邮政编码:</td>
<td class="style5">
<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
</td>
<td class="style6">
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ControlToValidate="TextBox6" ErrorMessage="邮政不合法" ValidationExpression="\d{6}"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="style4">
电话:</td>
<td class="style5">
<asp:TextBox ID="TextBox7" runat="server"></asp:TextBox>
</td>
<td class="style6">
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
ControlToValidate="TextBox7" ErrorMessage="电话不合法"
ValidationExpression="(\(\d{3}\)|\d{3}-)?\d{8}"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="style4">
邮箱:</td>
<td class="style5">
<asp:TextBox ID="TextBox8" runat="server"></asp:TextBox>
</td>
<td class="style6">
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server"
ControlToValidate="TextBox8" ErrorMessage="邮箱输入不正确"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="style2">
</td>
<td class="style3">
<asp:Button ID="Button1" runat="server" Text="确定" Width="82px"
οnclick="Button1_Click" />
<asp:Button ID="Button2" runat="server" Text="取消" Width="60px" />
</td>
<td>
</td>
</tr>
<tr>
<td class="style7">
</td>
<td class="style8">
</td>
<td class="style9">
<asp:ValidationSummary ID="ValidationSummary1" runat="server" Height="45px" />
</td>
</tr>
<tr>
<td class="style2">
</td>
<td class="style3">
</td>
<td>
</td>
</tr>
<tr>
<td class="style2">
</td>
<td class="style3">
</td>
<td>
</td>
</tr>
</table>
</div>
</form>
<div>
<table class="style1">
<tr>
<td class="style2">
用户名:</td>
<td class="style3">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
<td>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
ControlToValidate="TextBox1" ErrorMessage="请输入用户名"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style4">
密码:</td>
<td class="style5">
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</td>
<td class="style6">
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
ControlToValidate="TextBox2" ErrorMessage="请输入密码"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td class="style2">
确认密码:</td>
<td class="style3">
<asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
</td>
<td>
<asp:CompareValidator ID="CompareValidator1" runat="server"
ControlToCompare="TextBox3" ControlToValidate="TextBox2" ErrorMessage="密码不一致"></asp:CompareValidator>
</td>
</tr>
<tr>
<td class="style4">
年龄:</td>
<td class="style5">
<asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
</td>
<td class="style6">
<asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
ControlToValidate="TextBox4" ErrorMessage="请输入年龄"></asp:RequiredFieldValidator>
<asp:RangeValidator ID="RangeValidator1" runat="server"
ControlToValidate="TextBox4" ErrorMessage="年龄在20到50之间 " MaximumValue="50"
MinimumValue="20" Type="Integer"></asp:RangeValidator>
</td>
</tr>
<tr>
<td class="style4">
月收入:</td>
<td class="style5">
<asp:TextBox ID="TextBox5" runat="server"></asp:TextBox>
</td>
<td class="style6">
<asp:CompareValidator ID="CompareValidator3" runat="server"
ControlToValidate="TextBox5" ErrorMessage="月收入应为整数" Operator="DataTypeCheck"
Type="Integer"></asp:CompareValidator>
</td>
</tr>
<tr>
<td class="style4">
邮政编码:</td>
<td class="style5">
<asp:TextBox ID="TextBox6" runat="server"></asp:TextBox>
</td>
<td class="style6">
<asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server"
ControlToValidate="TextBox6" ErrorMessage="邮政不合法" ValidationExpression="\d{6}"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="style4">
电话:</td>
<td class="style5">
<asp:TextBox ID="TextBox7" runat="server"></asp:TextBox>
</td>
<td class="style6">
<asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server"
ControlToValidate="TextBox7" ErrorMessage="电话不合法"
ValidationExpression="(\(\d{3}\)|\d{3}-)?\d{8}"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="style4">
邮箱:</td>
<td class="style5">
<asp:TextBox ID="TextBox8" runat="server"></asp:TextBox>
</td>
<td class="style6">
<asp:RegularExpressionValidator ID="RegularExpressionValidator3" runat="server"
ControlToValidate="TextBox8" ErrorMessage="邮箱输入不正确"
ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
</td>
</tr>
<tr>
<td class="style2">
</td>
<td class="style3">
<asp:Button ID="Button1" runat="server" Text="确定" Width="82px"
οnclick="Button1_Click" />
<asp:Button ID="Button2" runat="server" Text="取消" Width="60px" />
</td>
<td>
</td>
</tr>
<tr>
<td class="style7">
</td>
<td class="style8">
</td>
<td class="style9">
<asp:ValidationSummary ID="ValidationSummary1" runat="server" Height="45px" />
</td>
</tr>
<tr>
<td class="style2">
</td>
<td class="style3">
</td>
<td>
</td>
</tr>
<tr>
<td class="style2">
</td>
<td class="style3">
</td>
<td>
</td>
</tr>
</table>
</div>
</form>