コード例 #1
0
ファイル: HTMLDispatcher.cs プロジェクト: Gab42/OOP
 public static string CreateUrl(string url, string title, string text)
 {
     ElementBuilder link = new ElementBuilder("a");
     link.AddAttribute("href", url);
     link.AddAttribute("title", title);
     link.AddContent(text);
     return link.ToString();
 }
コード例 #2
0
ファイル: HTMLDispatcher.cs プロジェクト: Gab42/OOP
 public static string CreateImage(string imgSource, string alt, string title)
 {
     ElementBuilder image = new ElementBuilder("img");
     image.AddAttribute("src", imgSource);
     image.AddAttribute("alt", alt);
     image.AddAttribute("title", title);
     return image.ToString();
 }
コード例 #3
0
ファイル: HTMLDispatcher.cs プロジェクト: Gab42/OOP
 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);
     return input.ToString();
 }
コード例 #4
0
        public static string CreateURL(string url2, string title, string text)
        {
            ElementBuilder url = new ElementBuilder("a");
            url.AddAtributes("href", url2);
            url.AddAtributes("title", title);
            url.AddContent(text);

            return url.ToString();
        }