Exemple #1
0
 public static IHtmlContent RadioList(this IHtmlHelper htmlHelper, string expression, bool inline = true, IEnumerable <SelectListItem> items = null, object divHtmlAttributes = null, object inputHtmlAttributes = null, object labelHtmlAttributes = null)
 {
     return(SelectListHtmlGenerator.GenerateRadioValueList(htmlHelper.ViewContext, null, expression, inline, items, divHtmlAttributes, inputHtmlAttributes, labelHtmlAttributes));
 }
Exemple #2
0
        public static IHtmlContent RadioListFor <TModel, TResult>(this IHtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TResult> > expression, bool inline = true, IEnumerable <SelectListItem> items = null, object divHtmlAttributes = null, object inputHtmlAttributes = null, object labelHtmlAttributes = null)
        {
            var modelExpression = GetModelExpression(htmlHelper, expression);

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