/// <summary> /// Removes from the control <see cref="WebControl.CssClass" /> property, the <c>CSS</c> classes that match the name from the passed parameters. /// </summary> /// <param name="webControl">The type the method operates on</param> /// <param name="classNameParams">The class name to remove</param> public static void RemoveCssClass(this WebControl webControl, params string[] classNameParams) { IEnumerable <string> classEnumerable = webControl.GetCssClassesExcept(classNameParams); webControl.CssClass = String.Join(" ", classEnumerable.ToArray()); }