Exemple #1
0
        /// <summary>
        /// Builds a Twitter Bootstrap style select control group.
        /// </summary>
        public static BootstrapSelectListFormGroupBuilder <TModel, TValue> BuildDropDownGroupFor <TModel, TValue>(
            this HtmlHelper <TModel> html,
            Expression <Func <TModel, TValue> > expression,
            Action <SelectListFormGroupConfig <TModel, TValue> > groupConfig = null)
        {
            var config = new SelectListFormGroupConfig <TModel, TValue>(html)
            {
                InitExpression = expression
            };

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

            return(new BootstrapSelectListFormGroupBuilder <TModel, TValue>(html, config));
        }
Exemple #2
0
        /// <summary>
        /// Builds a Twitter Bootstrap style text box control group.
        /// </summary>
        public static BootstrapSelectListFormGroupBuilder BuildDropDownGroup(
            this HtmlHelper html,
            string expression,
            Action <SelectListFormGroupConfig> groupConfig = null)
        {
            var config = new SelectListFormGroupConfig(html)
            {
                InitExpression = expression
            };

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

            return(new BootstrapSelectListFormGroupBuilder(html, config));
        }