Пример #1
0
 public static IWritable InputText(String name, bool encoded = false, String value = null)
 {
     var element = new HtmlElem("input")
         .WithAttr("type", (encoded) ? "password" : "text")
         .WithAttr("name", name);
     if( value != null )
     {
         element.WithAttr("value", value);
     }
     return element;
 }
Пример #2
0
 public static IWritable Div(string id, string clazz, params IWritable[] content)
 {
     HtmlElem elem = new HtmlElem("div")
         .WithAttr("id", id)
         .WithAttr("class", clazz);
     foreach(HtmlElem htmlElem in content)
     {
         elem.WithContent(htmlElem);
     }
     return elem;
 }
Пример #3
0
        //Adcionado
        public static IWritable InputRadioButton(String name, String value, Boolean isChecked)
        {
            var input = new HtmlElem("input")
                .WithAttr("type", "radio")
                .WithAttr("name", name)
                .WithAttr("value", value);

            if (isChecked)
                input.WithAttr("checked", "checked");

            return input;
        }
Пример #4
0
        public static IWritable InputText(String name, bool encoded = false, String value = null)
        {
            var element = new HtmlElem("input")
                          .WithAttr("type", (encoded) ? "password" : "text")
                          .WithAttr("name", name);

            if (value != null)
            {
                element.WithAttr("value", value);
            }
            return(element);
        }
Пример #5
0
        public static IWritable Div(string id, string clazz, params IWritable[] content)
        {
            HtmlElem elem = new HtmlElem("div")
                            .WithAttr("id", id)
                            .WithAttr("class", clazz);

            foreach (HtmlElem htmlElem in content)
            {
                elem.WithContent(htmlElem);
            }
            return(elem);
        }