public Button(string text, ButtonSettings settings, object htmlAttributes) { _text = text; _settings = settings ?? new ButtonSettings(); HtmlAttributes = new HtmlAttributes(htmlAttributes); _settings.UpdateAttributes(HtmlAttributes); HtmlAttributes["class"] = "btn"; if (_settings.Tag == Tag.Input) { HtmlTag = "input"; HtmlAttributes["value"] = text; } else { HtmlTag = _settings.Tag.ToString().ToLower(); InnerHtml = text; } }
public static Button Button(this HtmlHelper html, string text, ButtonSettings settings, object htmlAttributes = null) { return new Button(text, settings, htmlAttributes); }
public static Button Button(this HtmlHelper html, string text, ButtonSettings settings, object htmlAttributes = null) { return(new Button(text, settings, htmlAttributes)); }