Пример #1
0
        public static MvcHtmlString BootstrapBubmitButton(this HtmlHelper helper, string value, object htmlAttributes = null)
        {
            var submitButton = new TagBuilder("input");

            submitButton.AddCssClass("btn-u");
            submitButton.Attributes.Add("type", "submit");
            submitButton.Attributes.Add("value", value);
            submitButton.ApplyAttributes(htmlAttributes);
            return(new MvcHtmlString(submitButton.ToString()));
        }
Пример #2
0
        private static TagBuilder GenerateTextArea(string name, object htmlAttributes)
        {
            var textArea = new TagBuilder("textarea");

            textArea.AddCssClass("form-control");
            textArea.Attributes.Add("name", name);
            textArea.Attributes.Add("id", HtmlHelper.GenerateIdFromName(name));
            textArea.ApplyAttributes(htmlAttributes);

            return(textArea);
        }
Пример #3
0
        private static TagBuilder GenerateTextBox(string name, object htmlAttributes)
        {
            var input = new TagBuilder("input");

            input.AddCssClass("form-control");
            input.Attributes.Add("type", "text");
            input.Attributes.Add("name", name);
            input.Attributes.Add("id", HtmlHelper.GenerateIdFromName(name));
            input.ApplyAttributes(htmlAttributes);

            return(input);
        }