There is a CustomValidator for example:
protected void CheckAge_ServerValidate(object source, ServerValidateEventArgs args) { if (//условие) { args.IsValid = false; CheckAge_CustomValidator.ErrorMessage = "Error!"; } else args.IsValid = true; } You need to call the validator in Page_Load() and you need the result of the validator
If the validator earned, then perform the action
I tried this:
if (CheckAge_CustomValidator.IsValid == false) //если заработал и показывает ошибку { //------- }
validator.Validate();- tym32167IsValid- tym32167