Exemplo n.º 1
0
        public static MvcHtmlString BuildLabel(this HtmlHelper htmlHelper, string expression, Action <PFLabel> action = null)
        {
            var component = new PFLabel();

            component.SetPropertyFor(htmlHelper, expression);
            if (action != null)
            {
                action(component);
            }
            return(component.Html(htmlHelper, expression));
        }
Exemplo n.º 2
0
        public static MvcHtmlString BuildLabelFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, Action <PFLabel> action = null)
        {
            var component = new PFLabel();

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