swech
asked on
Comparing two password fields in asp.net
Pasword<asp:textbox id="txtPassword" class="textarea" textmode="password" runat="server"/>
<asp:requiredfieldvalidato
<asp:RegularExpressionVali
Repassword <asp:textbox id="txtRePassword" class="textarea" textmode="password" runat="server"/>
<asp:requiredfieldvalidato
<asp:RegularExpressionVali
<asp:CompareValidator
ControlToValidate="txtPass
ControlToCompare="txtRePas
Display="Dynamic"
Text="<br/>Password and Re-Password does not match."
Runat="Server" />
I'm try to compare two password field from the above code.the code is working fine the only problem is that.
when the form loads it is obvious that both fields are blank.And when i type in the Password field and move to the next Re-password field that without me typing anything in Re-password field it already compares the value and gives me the Error msg (Password and Re-Password does not match.).
should it compare the values in the two textbox only after i've typed on both the text boxes or when i click the button.
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER