示例#1
0
 protected void repeater_OnItemDataBound(object sender, RepeaterItemEventArgs e)
 {
     if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
     {
         var o  = (DAO.Menu)e.Item.DataItem;
         var r2 = (Repeater)e.Item.FindControl("repeaterChild");
         r2.DataSource = MenuDAO.GetChild(o.Id);
         r2.DataBind();
     }
 }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         //if (Request.Cookies["AdminID"] != null)
         //{
         //    Label1.Text = Request.Cookies["AdminID"].Value;
         //}
         repeater.DataSource = MenuDAO.GetChild(MenuDAO.GetRoot);
         repeater.DataBind();
     }
 }