protected void DuplicateUsernameValidator_ServerValidate(object source, ServerValidateEventArgs args) { if (RegistryUser == null) { EntityFactory ef = new EntityFactory(RegistryContext); args.IsValid = !ef.CheckEntityDuplicate(EntityType.User, Guid.Empty, Domain.Guid, args.Value); } }