/// <summary> /// Creates checkbox tag with class "checkbox", which is a Bootstrap class /// </summary> public static MvcHtmlString BootstrapCheckboxFor <T>(this HtmlHelper <T> htmlHelper, Expression <Func <T, bool> > expression, object htmlAttributes = null) { var modifiedHtmlAttributes = htmlAttributes.AddClass("checkbox"); var checkbox = htmlHelper.CheckBoxFor(expression, modifiedHtmlAttributes); return(checkbox); }
/// <summary> /// Creates label tag with class "control-label", which is a Bootstrap class /// </summary> public static MvcHtmlString BootstrapControlLabelFor <T1, T2>(this HtmlHelper <T1> htmlHelper, Expression <Func <T1, T2> > expression, object htmlAttributes = null) { var modifiedHtmlAttributes = htmlAttributes.AddClass("control-label"); var label = htmlHelper.LabelFor(expression, modifiedHtmlAttributes); return(label); }