public string CreateInput(string inputType, string name, string value)
 {
     ElementBuilder image = new ElementBuilder("input");
     image.AddAttribute("input", inputType);
     image.AddAttribute("name", name);
     image.AddAttribute("value", value);
     return image.ToString();
 }
 public string CreateURL(string url, string title, string text)
 {
     ElementBuilder image = new ElementBuilder("URL");
     image.AddAttribute("href", url);
     image.AddAttribute("title", title);
     image.AddAttribute("text", text);
     return image.ToString();
 }
 public string CreateImage(string imageSource,string alt, string title)
 {
     ElementBuilder image = new ElementBuilder("img");
     image.AddAttribute("src", imageSource);
     image.AddAttribute("alt", alt);
     image.AddAttribute("title", title);
     return image.ToString();
 }
예제 #4
0
        public static string CreateDiv(string id, string style, string content)
        {
            ElementBuilder div = new ElementBuilder("div");

            div.AddAttribute("id", id);
            div.AddAttribute("style", style);
            div.AddContent(content);
            return(div.ToString());
        }
예제 #5
0
        public static string CreateHyperlink(string url, string title, string text)
        {
            ElementBuilder hyperlink = new ElementBuilder("a");

            hyperlink.AddAttribute("url", url);
            hyperlink.AddAttribute("title", title);
            hyperlink.AddContent(text);
            return(hyperlink.ToString());
        }
예제 #6
0
        public static string CreateImage(string imgSrc, string alt, string title)
        {
            ElementBuilder img = new ElementBuilder("img", true);

            img.AddAttribute("src", imgSrc);
            img.AddAttribute("alt", alt);
            img.AddAttribute("title", title);
            return(img.ToString());
        }
예제 #7
0
        public static string CreateURL(string url, string title, string text)
        {
            ElementBuilder a = new ElementBuilder("a");
            a.AddAtributes("href", url);
            a.AddAtributes("title", title);
            a.AddContent(text);

            return a.ToString();
        }
예제 #8
0
        public static string CreateInput(string type, string name, string value)
        {
            ElementBuilder input = new ElementBuilder("input");
            input.AddAtributes("type", type);
            input.AddAtributes("name", name);
            input.AddAtributes("value", value);

            return input.ToString();
        }
예제 #9
0
        public static string CreateInput(string inputType, string nameValue, string titleValue)
        {
            ElementBuilder input = new ElementBuilder("input");

            input.AddAttribute("name", nameValue);
            input.AddAttribute("title", titleValue);

            return(input.ToString());
        }
        public static string CreateInput(string inputType, string name, string value)
        {
            ElementBuilder e = new ElementBuilder("input");

            e.AddAttribute("type", inputType);
            e.AddAttribute("name", name);
            e.AddAttribute("value", value);

            return(e.ToString());
        }
        public static string CreateURL(string url, string title, string text)
        {
            ElementBuilder e = new ElementBuilder("a");

            e.AddAttribute("href", url);
            e.AddAttribute("title", title);
            e.AddContent(text);

            return(e.ToString());
        }
예제 #12
0
        public static string CreateImage(string srcValue, string altValue, string titleValue)
        {
            ElementBuilder img = new ElementBuilder("img");

            img.AddAttribute("src", srcValue);
            img.AddAttribute("alt", altValue);
            img.AddAttribute("title", titleValue);

            return(img.ToString());
        }
예제 #13
0
        public static string CreateURL(string hrefValue, string titleValue, string content)
        {
            ElementBuilder anchor = new ElementBuilder("a");

            anchor.AddAttribute("href", hrefValue);
            anchor.AddAttribute("title", titleValue);
            anchor.AddContent(content);

            return(anchor.ToString());
        }
        public static string CreateImage(string imagSource, string alt, string title)
        {
            ElementBuilder element = new ElementBuilder("img");

            element.AddAttribute("src", imagSource);

            element.AddAttribute("alt", alt);

            element.AddAttribute("title", title);

            return(element.ToString());
        }
        public static string CreateImage(string imagSource, string alt, string title)
        {
            ElementBuilder element = new ElementBuilder("img");

            element.AddAttribute("src", imagSource);

            element.AddAttribute("alt", alt);

            element.AddAttribute("title", title);

            return element.ToString();
        }
예제 #16
0
        static void Main(string[] args)
        {
            ElementBuilder div = new ElementBuilder("div");
            ElementBuilder a = new ElementBuilder("a");
            ElementBuilder li = new ElementBuilder("li");

            div.AddAtributes("class", "softuni");
            div.AddAtributes("onclick", "highlight();");

            a.AddAtributes("href", "http://softuni.bg");
            a.AddContent("Software University");
            div.AddContent(a.ToString());

            Console.WriteLine(div);

            Console.WriteLine(li * 2);

            Console.WriteLine(HTMLDispatcher.CreateImage("http://softuni.bg/img/logo.png", "softuni-logo", "logo"));
            Console.WriteLine(HTMLDispatcher.CreateURL("http://softuni.bg", "Software University", "The best university in Bulgaria"));
            Console.WriteLine(HTMLDispatcher.CreateInput("text", "address", "Sofia bul. Vasil Kynchew 26"));
        }