using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Winson.EntityOP;
using Winson.Framework.Utility;

public partial class ListBuilderDemo : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        ListBuilder lb1 = new ListBuilder();
        ListBuilder lb2 = new ListBuilder("ul");
        lb2.SetTemplate("<a href=ListBuilder.aspx?tid={#id}" + "\" target=\"_blank\">{#title}</a> <span class='date'>[{#date}]</span>");
        lb2.AddTemplateData("id", "2");
        lb2.AddTemplateData("title", "Winson.Framework");
        lb2.AddTemplateData("date", "2009-01-01");
        lb2.EndTemplateData();
        lb1.AddTemplateData("lb2", lb2.ToString());
        lb1.SetTemplate("<a href=\"{#url}\" target=\"_blank\"><strong>{#sortName}</strong></a>\r\n{#lb2}");
        lb1.AddTemplateData("url", "http://www.szblogs.com");
        lb1.AddTemplateData("sortName", "深圳博客网");
        lb1.EndTemplateData();
        Label1.Text = lb1.ToString();
    }

}
