예제 #1
0
        public static MvcHtmlString BootstrapTextAreaFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, int textAreaRows, int textAreaColumns, IDictionary <string, object> htmlAttributes) where TModel : class
        {
            string    inputName = ExpressionHelper.GetExpressionText(expression);
            TProperty value     = CommonHtmlHelpers.GetValue(htmlHelper, expression);

            return(BootstrapTextAreaSpec(htmlHelper, inputName, value, textAreaRows, textAreaColumns, htmlAttributes, true));
        }
예제 #2
0
        public static MvcHtmlString BootstrapStyledDropDownListFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, IDictionary <string, object> htmlAttributes, IEnumerable <SelectListItem> selectList, string optionLabel = "") where TModel : class
        {
            string    inputName = ExpressionHelper.GetExpressionText(expression);
            TProperty value     = CommonHtmlHelpers.GetValue(htmlHelper, expression);

            return(htmlHelper.BootstrapStyledDropDownList(inputName, htmlAttributes, selectList, optionLabel));
        }
예제 #3
0
        public static MvcHtmlString BootstrapCheckBoxFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, IDictionary <string, object> htmlAttributes, string helpText = "") where TModel : class
        {
            string    inputName = ExpressionHelper.GetExpressionText(expression);
            TProperty value     = CommonHtmlHelpers.GetValue(htmlHelper, expression);

            return(htmlHelper.BootstrapCheckBox(inputName, bool.Parse(value.ToString()), htmlAttributes, helpText));
        }
        public static MvcHtmlString BootstrapDatepickerFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, IDictionary <string, object> htmlAttributes, bool withButton = false, string format = "dd.mm.yyyy") where TModel : class
        {
            string    inputName = ExpressionHelper.GetExpressionText(expression);
            TProperty value     = CommonHtmlHelpers.GetValue(htmlHelper, expression);

            return(htmlHelper.BootstrapDatepicker(inputName, value, htmlAttributes, withButton, format));
        }
        public static MvcHtmlString BootstrapTextBoxFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, IDictionary <string, object> htmlAttributes) where TModel : class
        {
            string    inputName = ExpressionHelper.GetExpressionText(expression);
            TProperty value     = CommonHtmlHelpers.GetValue(htmlHelper, expression);

            return(htmlHelper.BootstrapTextBox(inputName, value, htmlAttributes));
        }