I'm using an UpdatePanel and want to put a CompareValidator on two text boxes, to verify that the user-entered password and confirmation are the same.
This is working fine (I have VS2008 and am using .NET 3.5) out of the box, with one minor problem:
The validation is firing as soon as the user clicks out of the first textbox, before they get a chance to type into the second. This isn't causing any REAL problems, programmatically (all that happens is the error message shows, it goes away when they type in the confirmation) but our testers say it is a problem. It won't pass UA testing until the validation doesn't fire until they click 'Save'.
How do I get the CompareValidator to not fire until they've enterred text into both boxes?
EDIT:
Here's an example of the markup.
<div>
<div><asp:Label runat="server" ID="lblPassword" Text="Password"/></div>
<div><asp:TextBox runat="server" TextMode="password" ID="txtPassword" size="25" /></div>
</div>
<div>
<div><asp:Label runat="server" ID="lblConfirmPassword" Text="Confirm Password"/></div>
<div><asp:TextBox runat="server" TextMode="password" ID="txtConfirmPassword" size="25" /></div>
</div>
<asp:CompareValidator ID="CompareValidator1" ValidationGroup="PublishPassValidation" ControlToValidate="txtPassword" ControlToCompare="txtConfirmPassword" runat="server" ErrorMessage="Passwords do not match"></asp:CompareValidator>
The above is within a control contained within the ContentTemplate of an UpdatePanel on a page.
(CSS classes and styles removed for brevity)