コード例 #1
0
ファイル: NodeUc.ascx.cs プロジェクト: skrishnau/LMS
 public void AddNode(NodeUc uc)
 {
     //NodeUC innerUc =
     //        (NodeUC)Page.LoadControl("~/Views/Academy/CurrentAcademicYear/NodeUC.ascx");
     //innerUc.Text.Text =  text;
     uc.Parent = this;
     this.phNodes.Controls.Add(uc);
 }
コード例 #2
0
ファイル: ThreeButtonTest.aspx.cs プロジェクト: skrishnau/LMS
        protected void Page_Load(object sender, EventArgs e)
        {
            NodeUC1.LabelText = "Root";
            NodeUC1.Level     = 0;
            for (int i = 0; i < 2; i++)
            {
                NodeUc uc =
                    (NodeUc)Page.LoadControl("~/Views/UserControls/TreeTest/ThreButtonColorful/NodeUc.ascx");

                uc.LabelText = "i=" + i.ToString();
                uc.Level     = 1;
                for (int j = 0; j < 3; j++)
                {
                    NodeUc innerUc =
                        (NodeUc)Page.LoadControl("~/Views/UserControls/TreeTest/ThreButtonColorful/NodeUc.ascx");
                    innerUc.LabelText = "j=" + j.ToString();
                    innerUc.Level     = 2;
                    uc.AddNode(innerUc);
                }
                NodeUC1.AddNode(uc);
                //Nodes.Controls.Add(uc);
            }
        }