Пример #1
0
 public static IHtmlContent CheckboxButtonList(this IHtmlHelper htmlHelper, string expression, bool group, IEnumerable <SelectListItem> items = null, object spanHtmlAttributes = null, object inputHtmlAttributes = null, object labelHtmlAttributes = null)
 {
     return(SelectListHtmlGenerator.GenerateCheckboxValueButtonList(htmlHelper.ViewContext, null, expression, items, group, spanHtmlAttributes, inputHtmlAttributes, labelHtmlAttributes));
 }
Пример #2
0
        public static IHtmlContent CheckboxButtonListFor <TModel, TResult>(this IHtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TResult> > expression, bool group, IEnumerable <SelectListItem> items = null, object spanHtmlAttributes = null, object inputHtmlAttributes = null, object labelHtmlAttributes = null)
        {
            var modelExpression = GetModelExpression(htmlHelper, expression);

            return(SelectListHtmlGenerator.GenerateCheckboxValueButtonList(htmlHelper.ViewContext, modelExpression.ModelExplorer, modelExpression.Name, items, group, spanHtmlAttributes, inputHtmlAttributes, labelHtmlAttributes));
        }