public static IHtmlString LabelFor <T>(this BootstrapHelpers <T> helpers, T model, Expression <Func <T, object> > expression, object htmlAttributes = null) { var info = expression.GetTargetMemberInfo(); var label = info.GetLabel(); return(Label(helpers, label, info.Name, htmlAttributes)); }
public static IHtmlString DateTimeLocalFor <T>(this BootstrapHelpers <T> helpers, T model, Expression <Func <T, DateTime> > expression, object htmlAttributes = null) { var name = expression.GetTargetMemberInfo().Name; var value = expression.Compile()(model); return(DateTimeLocal(helpers, name, value, htmlAttributes)); }
public static IHtmlString LabelFor <T>(this BootstrapHelpers <T> helpers, Expression <Func <T, object> > expression, object htmlAttributes = null) { return(LabelFor(helpers, helpers.View.Model, expression, htmlAttributes)); }
public static IHtmlString Label <T>(this BootstrapHelpers <T> helpers, string label, string @for, object htmlAttributes = null) { return(new NonEncodedHtmlString(helpers.Renderer.Label(label, @for, htmlAttributes))); }
// DateTimeLocal // public static IHtmlString DateTimeLocal <T>(this BootstrapHelpers <T> helpers, string name, DateTime value, object htmlAttributes = null) { return(new NonEncodedHtmlString(helpers.Renderer.DateTimeLocal(name, value, htmlAttributes))); }
// TextBox // public static IHtmlString TextBox <T>(this BootstrapHelpers <T> helpers, string name, object value, object htmlAttributes = null) { return(new NonEncodedHtmlString(helpers.Renderer.TextBox(name, value, htmlAttributes))); }