コード例 #1
0
 public static string CreateInput(string type, string name, string value)
 {
     ElementBuilder eb = new ElementBuilder("input", true);
     eb.AddAtribute("type", type);
     eb.AddAtribute("name", name);
     eb.AddAtribute("value", value);
     return eb.ToString();
 }
コード例 #2
0
 public static string CreateImage(string imgSrc, string alt, string title)
 {
     ElementBuilder img = new ElementBuilder("img", true);
     img.AddAtribute("src", imgSrc);
     img.AddAtribute("alt", alt);
     img.AddAtribute("title", title);
     return img.ToString();
 }
コード例 #3
0
 public static string CreateURL(string url, string title, string text)
 {
     ElementBuilder eb = new ElementBuilder("a");
     eb.AddAtribute("url", url);
     eb.AddAtribute("title", title);
     eb.AddContent(text);
     return eb.ToString();
 }
コード例 #4
0
        public static string CreateImage(string imgSrc, string alt, string title)
        {
            ElementBuilder img = new ElementBuilder("img", true);

            img.AddAtribute("src", imgSrc);
            img.AddAtribute("alt", alt);
            img.AddAtribute("title", title);
            return(img.ToString());
        }
コード例 #5
0
        public static string CreateInput(string type, string name, string value)
        {
            ElementBuilder eb = new ElementBuilder("input", true);

            eb.AddAtribute("type", type);
            eb.AddAtribute("name", name);
            eb.AddAtribute("value", value);
            return(eb.ToString());
        }
コード例 #6
0
        public static string CreateURL(string url, string title, string text)
        {
            ElementBuilder eb = new ElementBuilder("a");

            eb.AddAtribute("url", url);
            eb.AddAtribute("title", title);
            eb.AddContent(text);
            return(eb.ToString());
        }
コード例 #7
0
        static void Main(string[] args)
        {
            ElementBuilder div = new ElementBuilder("div");
            div.AddAtribute("id", "page");
            div.AddAtribute("class", "big");
            div.AddContent("<p>Hello</p>");
            Console.WriteLine(div);
            Console.WriteLine(div * 3);

            string link = HTMLDispatcher.CreateURL("http://www.2leva.com", "2lv", "Some shit");
            Console.WriteLine(link);

            string input = HTMLDispatcher.CreateInput("hello", "lala", "100");
            Console.WriteLine(input);
        }
コード例 #8
0
        static void Main(string[] args)
        {
            ElementBuilder div = new ElementBuilder("div");

            div.AddAtribute("id", "page");
            div.AddAtribute("class", "big");
            div.AddContent("<p>Hello</p>");
            Console.WriteLine(div);
            Console.WriteLine(div * 3);

            string link = HTMLDispatcher.CreateURL("http://www.2leva.com", "2lv", "Some shit");

            Console.WriteLine(link);

            string input = HTMLDispatcher.CreateInput("hello", "lala", "100");

            Console.WriteLine(input);
        }