I have a page containing an to leave the page and a <asp:Button/> to get some date and another <asp:TextBox/> to confirm that data.<asp:TextBox/>
The confirm validator is configured as follows:
<asp:CompareValidator ID="CompareValidator" runat="server" ErrorMessage="error message" ControlToValidate="ConfirmTextBox" ControlToCompare="TextBox" Operator="Equal"></asp:CompareValidator> On the page, when editing the fields, the compare validator runs when the ControlToValidate or ControlToCompare loses focus.
When editing either fields, then clicking the button to leave the page, the compare validator runs and displays the error message but the Button_Click method is not run.
The causesValidation attribute of the button is set to false.
Can I make the Button_Click method run while maintaining the compare validator's functionality, without resorting to server validating or a regexValidator that uses the TextBox.Text value?