コード例 #1
0
 public static IHtmlContent RadioButtonList(this IHtmlHelper htmlHelper, string expression, bool groupRadioButtons = true, IEnumerable <SelectListItem> items = null, object divHtmlAttributes = null, object inputHtmlAttributes = null, object labelHtmlAttributes = null)
 {
     return(SelectListHtmlGenerator.GenerateRadioValueButtonList(htmlHelper.ViewContext, null, expression, items, groupRadioButtons, divHtmlAttributes, inputHtmlAttributes, labelHtmlAttributes));
 }
コード例 #2
0
        public static IHtmlContent RadioButtonListFor <TModel, TResult>(this IHtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TResult> > expression, bool group = true, IEnumerable <SelectListItem> items = null, object divHtmlAttributes = null, object inputHtmlAttributes = null, object labelHtmlAttributes = null)
        {
            var modelExpression = GetModelExpression(htmlHelper, expression);

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