protected override void CreateChildControls() { Controls.Clear(); rptList = new Repeater(); plhHeader = new WebPlaceHolder(); plhFooter = new WebPlaceHolder(); if (ItemTemplate != null) { rptList.ItemTemplate = ItemTemplate; } if (AlternatingItemTemplate != null) { rptList.ItemTemplate = AlternatingItemTemplate; } if (SeparatorTemplate != null) { rptList.SeparatorTemplate = SeparatorTemplate; } PopulateListControls(); if (HeaderTemplate != null) { HeaderTemplate.InstantiateIn(plhHeader); } if (FooterTemplate != null) { FooterTemplate.InstantiateIn(plhFooter); } rptList.ItemCreated += ListItemCreated; rptList.ItemDataBound += ListItemDataBound; }
protected override void CreateChildControls() { Controls.Clear(); rptList = new Repeater(); plhHeader = new WebPlaceHolder(); plhFooter = new WebPlaceHolder(); if(ItemTemplate != null) { rptList.ItemTemplate = ItemTemplate; } if(AlternatingItemTemplate != null) { rptList.ItemTemplate = AlternatingItemTemplate; } if(SeparatorTemplate != null) { rptList.SeparatorTemplate = SeparatorTemplate; } PopulateListControls(); if(HeaderTemplate != null) { HeaderTemplate.InstantiateIn(plhHeader); } if(FooterTemplate != null) { FooterTemplate.InstantiateIn(plhFooter); } rptList.ItemCreated += ListItemCreated; rptList.ItemDataBound += ListItemDataBound; }