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)); }
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)); }