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(); } }
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(); } }