Hi folks, this problem is greatly irritating me. Have a web form with some validators against each field and a 'Calculate' button with a code-behind event-handler.
The Calculate button is set as the default button for the form.
If you enter the form and press Calculate straight away. the validation fires as you would expect and the first validation fail is displayed.
However, if you press Calculate the second time it goes ahead and submits even though the event handler for the calculate button is thus:
Page.Validate("calculations");
if (Page.IsValid)
{
setCalculatorInputs();
calcFlowType();
updateOutputs();
}
else
{
systemState = calculationState.calcFailed;
alert.setAlert(Resources.Messages.SinglePhase_Validation_Err, false);
}
The Page.IsValid returns True even though the value is still invalid?.
PLUS
The clientside custom validator also ...
Go to the complete details ...