示例#1
0
	public Html form_start(Attr at)
	{
	    return vfmt("<form{0}>", at);
	}
示例#2
0
	public Html form(Attr at, params Html[] ha)
	{
	    return v(form_start(at), ha, form_end());
	}
示例#3
0
	public Html th(Attr at, string s)
	{
	    return vfmt("<th{0}>{1}</th>", at, text(s));
	}
示例#4
0
	public Html th(Attr at, params Html[] ha)
	{
	    return v(vfmt("<th{0}>", at), ha, v("</th>"));
	}
示例#5
0
	public Html span(Attr at, params Html[] ha)
	{
	    return v(vfmt("<span{0}>", at),
		     ha,
		     v("</span>"));
	}
示例#6
0
	public Html div_start(Attr at)
	{
	    return vfmt("<div{0}>", at);
	}
示例#7
0
	public Html tr_start(Attr at)
	{
	    return new Html(Context.Body, vfmt("<tr{0}>", at));
	}
示例#8
0
	public Html a(Attr at, params Html[] ha)
	{
	    return v(vfmt("<a{0}>", at),
		     ha,
		     v("</a>"));
	}
示例#9
0
	public Html table_start(Attr at)
	{
	    return vfmt("<table{0}>", at);
	}
示例#10
0
	public Html tr(Attr at, params Html[] ha)
	{
	    return new Html(Context.Body,
			    tr_start(at),
			    ha,
			    tr_end());
	}
示例#11
0
	public Html ul(Attr at, params Html[] ha)
	{
	    return v(ul_start(at), ha, ul_end());
	}
示例#12
0
	public Html ul_start(Attr at)
	{
	    return vfmt("<ul{0}>", at);
	}
示例#13
0
	public Html div(Attr at, params Html[] ha)
	{
	    return v(div_start(at), ha, div_end());
	}
示例#14
0
	public Html input(Attr at, string id, params Html[] ha)
	{
	    return vfmt("<input{0}></input>", new Attr(at, "name", id));
	}
示例#15
0
	public Html td(Attr at, string s)
	{
	    return td(at, text(s));
	}
示例#16
0
	public Html editinplace(string id, string type,
				     Attr at, params Html[] ha)
	{
	    if (type == "textarea")
	    {
		return v(vfmt("<textarea{0}{1}>",
			      new Attr("name", id,
				       "editinplace", "textarea"),
			      at),
			 ha,
			 v("</textarea>"));
	    }
	    else
	    {
		return v(vfmt("<span{0}{1}>",
			      new Attr("id", id,
				       "editinplace", type),
			      at),
			 ha,
			 v("</span>"));
	    }
	}
示例#17
0
	public Html td(Attr at, params Html[] ha)
	{
	    return v(td_start(at),
		     ha,
		     td_end());
	}
示例#18
0
	public Html ahref(Attr at, string url, params Html[] ha)
	{
	    return v(vfmt("<a{0}{1}>", new Attr("href", url), at),
		     ha,
		     v("</a>"));
	}
示例#19
0
	public Html td_start(Attr at)
	{
	    return vfmt("<td{0}>", at);
	}
示例#20
0
	public Html p(Attr at, params Html[] ha)
	{
	    return v(vfmt("<p{0}>", at),
		     ha,
		     v("</p>\n"));
	}
示例#21
0
	public Attr(Attr parent, params object[] sa)
	{
	    wv.assert((sa.Length % 2) == 0);
	    
	    if (parent != null)
		s = parent.ToString();
	    
	    for (int i = 0; i < sa.Length; i += 2)
		s += String.Format(" {0}=\"{1}\"",
		   HttpUtility.HtmlAttributeEncode(sa[i].ToString()),
		   HttpUtility.HtmlAttributeEncode(sa[i+1].ToString()));
	}