Exemple #1
0
        public void InstantiateIn(Control container)
        {
            ListItemPlaceHolder phAll = new ListItemPlaceHolder();

            NavLinkForTemplate lnk = new NavLinkForTemplate();

            lnk.LinkText    = " LINK ";
            lnk.NavigateUrl = "#";

            ListItemWrapper wrap = new ListItemWrapper();

            wrap.Controls.Add(lnk);

            lnk.DataBinding += new EventHandler(lnkContent_DataBinding);

            phAll.Controls.Add(wrap);

            container.Controls.Add(phAll);
        }
Exemple #2
0
        private void LoadCtrsl()
        {
            int iMax = this.Controls.Count;

            SetTag();

            ctrlAll.Controls.Clear();
            ctrlAll.Controls.Add(litOpen);

            //instead of wind/unwind, pop stack X times
            for (int i = 0; i < iMax; i++)
            {
                ctrlAll.Controls.Add(this.Controls[0]);
            }

            ListItemPlaceHolder ph = new ListItemPlaceHolder();

            ctrlAll.Controls.Add(ph);
            ctrlAll.Controls.Add(litClose);

            this.Controls.Clear();
            this.Controls.Add(ctrlAll);
        }
        public void InstantiateIn(Control container)
        {
            ListItemPlaceHolder phAll = new ListItemPlaceHolder();

            NavLinkForTemplate lnk = new NavLinkForTemplate();
            lnk.LinkText = " LINK ";
            lnk.NavigateUrl = "#";

            ListItemWrapper wrap = new ListItemWrapper();
            wrap.Controls.Add(lnk);

            lnk.DataBinding += new EventHandler(lnkContent_DataBinding);

            phAll.Controls.Add(wrap);

            container.Controls.Add(phAll);
        }
        private void LoadCtrsl()
        {
            int iMax = this.Controls.Count;

            SetTag();

            ctrlAll.Controls.Clear();
            ctrlAll.Controls.Add(litOpen);

            //instead of wind/unwind, pop stack X times
            for (int i = 0; i < iMax; i++) {
                ctrlAll.Controls.Add(this.Controls[0]);
            }

            ListItemPlaceHolder ph = new ListItemPlaceHolder();

            ctrlAll.Controls.Add(ph);
            ctrlAll.Controls.Add(litClose);

            this.Controls.Clear();
            this.Controls.Add(ctrlAll);
        }