.net验证控件
1.判断是否为空的验证
<asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ErrorMessage="手机号码不能为空" ControlToValidate="txtname" Font-Size="Smaller" ForeColor="Red"></asp:RequiredFieldValidator>
2.判断两个值是否一致
<asp:CompareValidator ID="CompareValidator1" runat="server" ErrorMessage="密码不一致" ControlToCompare="txtpassword" ControlToValidate="txtpasswordb"></asp:CompareValidator>