Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Jul 11, 2012 01:51 AM by Decker Dong - MSFT
Jul 09, 2012 01:05 PM|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 02:59 PM|LINK
not very clear on you question
all the added controls are rendred and sent to client at one shot
Jul 11, 2012 01:51 AM|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.