Beispiel #1
0
 public static string CreateURL(string url, string title, string text)
 {
     ElementBuilder URL = new ElementBuilder("a");
     URL.AddAttribute(url,title);
     URL.AddContent(text);
     return URL.ToString();
 }
Beispiel #2
0
        public static string CreateURL(string url, string title, string text)
        {
            ElementBuilder URL = new ElementBuilder("a");

            URL.AddAttribute(url, title);
            URL.AddContent(text);
            return(URL.ToString());
        }
Beispiel #3
0
 public static string CreateInput(string type, string name, string value)
 {
     ElementBuilder input = new ElementBuilder("input");
     input.AddAttribute("type",type);
     input.AddAttribute("name",name);
     input.AddAttribute("value", value);
     input.Close = null;
     return input.ToString();
 }
Beispiel #4
0
 public static string CreateImage(string source, string alt, string title)
 {
    
     ElementBuilder img = new ElementBuilder("img");
     img.AddAttribute("source",source);
     img.AddAttribute("alt",alt);
     img.AddAttribute("title",title);
     img.Close = null;
     return img.ToString();
 }
Beispiel #5
0
        public static string CreateImage(string source, string alt, string title)
        {
            ElementBuilder img = new ElementBuilder("img");

            img.AddAttribute("source", source);
            img.AddAttribute("alt", alt);
            img.AddAttribute("title", title);
            img.Close = null;
            return(img.ToString());
        }
Beispiel #6
0
        public static string CreateInput(string type, string name, string value)
        {
            ElementBuilder input = new ElementBuilder("input");

            input.AddAttribute("type", type);
            input.AddAttribute("name", name);
            input.AddAttribute("value", value);
            input.Close = null;
            return(input.ToString());
        }
Beispiel #7
0
        static void Main()
        {
            //Created with the method CreatedImage in class HTMLDispatcher
            string testOne = HTMLDispatcher.CreateImage("picture.jpg", "Softuni Dudes", "picture One");
            Console.WriteLine(testOne);

            //Created with the Elementbuilder class directly
            ElementBuilder testTwo = new ElementBuilder("div");
            testTwo.AddAttribute("class", "big");
            Console.WriteLine(testTwo);
            

            //Created with the method CreatedImage in class HTMLDispatcher
            string testThree = HTMLDispatcher.CreateURL("href", "http://www.w3schools.com/html/", "Visit our HTML tutorial");
            Console.WriteLine(testThree);

            //Created with the method CreatedImage in class HTMLDispatcher
            string testFour = HTMLDispatcher.CreateInput("text","fname", "Submit");
            Console.WriteLine(testFour);
        }
Beispiel #8
0
        static void Main()
        {
            //Created with the method CreatedImage in class HTMLDispatcher
            string testOne = HTMLDispatcher.CreateImage("picture.jpg", "Softuni Dudes", "picture One");

            Console.WriteLine(testOne);

            //Created with the Elementbuilder class directly
            ElementBuilder testTwo = new ElementBuilder("div");

            testTwo.AddAttribute("class", "big");
            Console.WriteLine(testTwo);


            //Created with the method CreatedImage in class HTMLDispatcher
            string testThree = HTMLDispatcher.CreateURL("href", "http://www.w3schools.com/html/", "Visit our HTML tutorial");

            Console.WriteLine(testThree);

            //Created with the method CreatedImage in class HTMLDispatcher
            string testFour = HTMLDispatcher.CreateInput("text", "fname", "Submit");

            Console.WriteLine(testFour);
        }