protected override bool EvaluateIsValid() { // DesktopValidationEventArgs args = new DesktopValidationEventArgs(); // if (EvaluatingContext != null) { // trying evaluate manual context EvaluatingContext(this, args); // return args.ContextIsValid; } return true; }
protected override bool EvaluateIsValid() { // DesktopValidationEventArgs args = new DesktopValidationEventArgs(); // if (EvaluatingContext != null) { // trying evaluate manual context EvaluatingContext(this, args); // return(args.ContextIsValid); } return(true); }
protected void ctxValDomain_EvaluatingContext(object sender, DesktopValidationEventArgs e) { if (Parent != null) ctrl = (MailEditAddress)Parent.Parent.FindControl("emailAddress"); string moderator = ddlListModerators.SelectedValue; if (ctrl != null) { if (String.Equals(GetDomainName(moderator), GetDomainName(ctrl.Email), StringComparison.InvariantCultureIgnoreCase)) { e.ContextIsValid = true; return; } } e.ContextIsValid = false; }