Advertisement
Guest User

[OOP]-02.StaticMembers-05.HTML Dispatcher

a guest
Nov 23rd, 2015
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.13 KB | None | 0 0
  1. namespace _05.HTMLDispatcher
  2. {
  3. public static class HTMLDispatcher
  4. {
  5. public static string CreateImage(string imageSource, string alt, string title)
  6. {
  7. ElementBuilder image = new ElementBuilder("Image");
  8. image.AddAttribute("imagesource", imageSource);
  9. image.AddAttribute("alt", alt);
  10. image.AddAttribute("title", title);
  11.  
  12. return image.ToString();
  13. }
  14.  
  15. public static string CreateURL(string url, string title, string text)
  16. {
  17. ElementBuilder url0 = new ElementBuilder("URL");
  18. url0.AddAttribute("url", url);
  19. url0.AddAttribute("title", title);
  20. url0.AddAttribute("text", text);
  21.  
  22. return url0.ToString();
  23. }
  24.  
  25. public static string CreateInput(string inputType, string name, string value)
  26. {
  27. ElementBuilder input = new ElementBuilder("URL");
  28. input.AddAttribute("url", inputType);
  29. input.AddAttribute("title", name);
  30. input.AddAttribute("text", value);
  31.  
  32. return input.ToString();
  33. }
  34. }
  35. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement