示例#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;
 }
        //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);
        }