A very easy way to get around this would be to reverse ControlToCompare and ControlToValidate
<label>Password: <asp:TextBox ID="password" runat="server"></asp:TextBox></label><br/> <label>Confirm Password:<asp:TextBox ID="confirmPassword" runat="server"></asp:TextBox></label> <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="password" ControlToValidate="confirmPassword" ErrorMessage="Passwords do not match"></asp:CompareValidator>
Having canceled these properties, the check should happen only when they leave the password confirmation text field. (This assumes that the user fills out the form from top to bottom, and not from bottom to top, but who does it anyway)
source share