private static void SetErrorState(HtmlControl control, bool state) { if (!state) { control.RemoveCssClass("error"); return; } else { control.AppendCssClass("error"); return; } }