예제 #1
0
        /// <summary>
        /// Get menu with links to each form
        /// </summary>
        /// <returns>html</returns>
        private string GetMenuPage()
        {
            HtmlBuilder b = new HtmlBuilder();

            b.open("html");
            b.open("head");
            b.open("script", b.attr("language", "javascript"));
            b.append("function frmUpdate(page){ parent.contents.location=page; }\n");
            b.close("script");
            b.close("head");
            b.open("body");
            b.open("fieldset");
            b.open("table");

            List <string> uList = new List <string>();

            foreach (var pair in inputs)
            {
                string s = pair.Value.Form.Name;
                if (!uList.Contains(s))
                {
                    uList.Add(s);

                    b.open("tr");
                    b.open("td");
                    b.open("a", b.attr("href", "", "onClick", b.fmt("frmUpdate('{0}.cgi');", s)));
                    b.append(b.text(s));
                    b.close("a");
                    b.close("td");
                    b.close("tr");
                }
            }

            b.close_all();
            return(b.ToString());
        }