<body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="Enter Your Password"></asp:Label><asp:TextBox
ID="PassTextBox" runat="server"></asp:TextBox>
<asp:RangeValidator ID="RangeValidator1" runat="server"
ControlToValidate="PassTextBox" ErrorMessage="RangeValidator" MaximumValue="20"
MinimumValue="10" SetFocusOnError="True"></asp:RangeValidator>
<br/>
<asp:Label ID="Label2" runat="server" Text="Confirm Password"></asp:Label><asp:TextBox
ID="ConfrmTextBox" runat="server"></asp:TextBox><asp:CompareValidator ID="CompareValidator"
runat="server" ErrorMessage="Password is not match"
ControlToCompare="ConfrmTextBox" ControlToValidate="PassTextBox"
EnableClientScript="False" SetFocusOnError="True">Main Password and confirm password is not match</asp:CompareValidator>
<asp:Button ID="Button1" runat="server" Text="Button" />
<asp:ValidationSummary ID="ValidationSummary1" runat="server" />
</div>
</form>
</body>
<form id="form1" runat="server">
<div>
<asp:Label ID="Label1" runat="server" Text="Enter Your Password"></asp:Label><asp:TextBox
ID="PassTextBox" runat="server"></asp:TextBox>
<asp:RangeValidator ID="RangeValidator1" runat="server"
ControlToValidate="PassTextBox" ErrorMessage="RangeValidator" MaximumValue="20"
MinimumValue="10" SetFocusOnError="True"></asp:RangeValidator>
<br/>
<asp:Label ID="Label2" runat="server" Text="Confirm Password"></asp:Label><asp:TextBox
ID="ConfrmTextBox" runat="server"></asp:TextBox><asp:CompareValidator ID="CompareValidator"
runat="server" ErrorMessage="Password is not match"
ControlToCompare="ConfrmTextBox" ControlToValidate="PassTextBox"
EnableClientScript="False" SetFocusOnError="True">Main Password and confirm password is not match</asp:CompareValidator>
<asp:Button ID="Button1" runat="server" Text="Button" />
<asp:ValidationSummary ID="ValidationSummary1" runat="server" />
</div>
</form>
</body>
No comments:
Post a Comment