protected void cvExtensionsAllowed_ServerValidate(object sender, ServerValidateEventArgs e) { string[] allowed = GetAllowedFileExtensions(); bool wildcardFound = (from s in allowed where s == "*" select s).Any(); e.IsValid = allowed.Length <= 1 || allowed.Length > 1 && !wildcardFound; }