예제 #1
0
        public static MvcHtmlString FieldSetFor(this HtmlHelper helper, Type type, object defaults = null, string legendText = null, object wrapperAttrs = null)
        {
            InputFormBuilder builder = new InputFormBuilder();
            TagBuilder       tag     = builder.FieldsetFor(type, defaults, legendText);

            tag.AttrsIf(wrapperAttrs != null, wrapperAttrs);
            return(tag.ToMvcHtml());
        }
예제 #2
0
        public static MvcHtmlString InputFor(this HtmlHelper helper,
                                             Type type,
                                             object buttonAttributes  = null,
                                             object wrapperAttributes = null,
                                             object defaultValues     = null,
                                             string name       = null,
                                             string labelClass = null)
        {
            InputFormBuilder builder = CreateBuilder(type, labelClass);

            return(builder.FieldsetFor(type, defaultValues, name)
                   .AttrsIf(wrapperAttributes != null, wrapperAttributes)
                   .ChildIf(buttonAttributes != null, new TagBuilder("span").Button(buttonAttributes))
                   .ToHtml());
        }
예제 #3
0
        public static TagBuilder InputFor(this HtmlHelper helper, Type type, object defaultValues = null, string name = null, string labelClass = null)
        {
            InputFormBuilder builder = CreateBuilder(type, labelClass);

            return(builder.FieldsetFor(type, defaultValues, name));
        }