Author: dvdrgods | Posted on: 1/19/2010 4:19:20 AM | Views : 309

Ok.  I've conjured up a simple example to ask my question.
Diagram of Heirarchy
 Page (TYpeof(P))
   --  Dynamic PlaceholderControl(Typeof(C1))
             --  Many Dynamic controls added to the PlaceHolder Control. (Typeof(C2))
 
So, here's my question.  Normally, when I hit Page_Load(), I will load all the dynamic controls(C2), to my placeHolderControl (C1).  So, now, we can use the example of a navigation page.  What happens is a user asks to see the next page of data.
So in my Page lifecycle, I've run P.Page_Load; this run C1.Page_Load() which then new's all my controls of Type.C2 and does a C1.Controls.Add(new C2). 
Next, events are fired, and now, I realize that I need to load a different set. 
So, the following code happens...
C1.Controls.Clear(); Go to the complete details ...