예제 #1
0
        /// <summary>
        /// Builds a Twitter Bootstrap style text box control group.
        /// </summary>
        public static BootstrapTextboxFormGroupBuilder BuildTextBoxGroup(
            this HtmlHelper html,
            string expression,
            Action <TextBoxFormGroupConfig> groupConfig = null)
        {
            var config = new TextBoxFormGroupConfig(html)
            {
                InitExpression = expression
            };

            if (groupConfig != null)
            {
                groupConfig(config);
            }

            return(new BootstrapTextboxFormGroupBuilder(html, config));
        }
예제 #2
0
        /// <summary>
        /// Builds a Twitter Bootstrap style text box control group.
        /// </summary>
        public static BootstrapTextboxFormGroupBuilder <TModel, TValue> BuildTextBoxGroupFor <TModel, TValue>(
            this HtmlHelper <TModel> html,
            Expression <Func <TModel, TValue> > expression,
            Action <TextBoxFormGroupConfig <TModel, TValue> > groupConfig = null)
        {
            var config = new TextBoxFormGroupConfig <TModel, TValue>(html)
            {
                InitExpression = expression
            };

            if (groupConfig != null)
            {
                groupConfig(config);
            }

            return(new BootstrapTextboxFormGroupBuilder <TModel, TValue>(html, config));
        }