3 using System
.Collections
;
9 public static void Main()
11 HtmlGen g
= new HtmlGen(Console
.OpenStandardOutput());
13 g
.send(g
.title("My Title"),
14 g
.include_css("webtest.css"),
16 // g.use_tablesort() // incompatible with editinplace...
19 g
.send(g
.form_start(new Attr("action", "",
26 g
.text("This is some text."));
28 g
.send(g
.h1("Query variables:"));
30 g
.send(g
.table_start());
31 g
.send(g
.tr(g
.th("Key"), g
.th("Value")));
32 foreach (string key
in cgi
.request
.Keys
)
33 g
.send(g
.tr(g
.td(key
), g
.td(g
.pre(cgi
.request
[key
]))));
34 g
.send(g
.table_end());
37 g
.editinplace("bigtext", "textarea",
39 g
.text("some big text\nanother line")));
41 g
.editinplace("big2text", "textarea",
42 new Attr("tooltip", g
.text("foo <monkeys>")),
43 g
.text("big text 2\nanother < <line>!")));
46 g
.editinplace("hello", "text",
48 g
.text("this is the content")),
51 g
.send(g
.table_start(new Attr("id", "foo1",
62 g
.td(g
.editinplace("wolf", "text",
63 new Attr("powersearch",
64 "Dog,Cat,Monkey,Blueberry"),
68 g
.td(g
.editinplace("7", "text",
69 new Attr("autovalidate",
74 g
.send(g
.ul_start(new Attr("id", "foo2",
84 g
.li(g
.ul(g
.li("Big"),
92 g
.send(g
.h1("Environment variables:"));
93 g
.send(g
.table_start());
94 g
.send(g
.tr(g
.th("Key"), g
.th("Value")));
95 IDictionary env
= Environment
.GetEnvironmentVariables();
96 foreach (string key
in env
.Keys
)
97 g
.send(g
.tr(g
.td(key
), g
.td((string)env
[key
])));
98 g
.send(g
.table_end());
100 g
.send(g
.submit("Subm\"it!"),