Last post Jul 10, 2012 09:51 PM by Decker Dong - MSFT
Jul 09, 2012 09:05 AM|benjib98|LINK
I created a Toolbar like server control which can contain multiple ToolbarItems. When the ToolbarItems (short items) are added dynamically in the OnInit or PageLoad event of the page the items are hooked up properly (items maintained between postbacks, server
click events work properly).
There is however a need to be able to add items dynamically outside of the above life cycle events. Say a button is clicked and in its Button_Click handler more items are added to the Toolbar. These "late" items are not showing up, which I do understand
why as they are added to the control too late and aren't wired up properly, but is there a workaround for this?
Jul 09, 2012 10:59 AM|Mudasir.Khan|LINK
not very clear on you question
all the added controls are rendred and sent to client at one shot
Jul 10, 2012 09:51 PM|Decker Dong - MSFT|LINK
Please make sure that you've called something like Controls.Add(some new controls) in the event of page-LoadComplete in order to add more controls there.