예제 #1
0
        public static MvcHtmlString BuildRadioButtonList(this HtmlHelper htmlHelper, string name, object value = null, Action <PFRadioButtonList> action = null)
        {
            var component = new PFRadioButtonList();

            component.SetPropertyFor(htmlHelper, name);
            if (action != null)
            {
                action(component);
            }
            return(component.Html(htmlHelper, name, value));
        }
예제 #2
0
        public static MvcHtmlString BuildRadioButtonListFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, Action <PFRadioButtonList> action = null)
        {
            var component = new PFRadioButtonList();

            component.SetPropertyFor(htmlHelper, expression);
            if (action != null)
            {
                action(component);
            }
            return(component.Html(htmlHelper, expression));
        }