A
Andrew Robinson
I have a page that can load a number of different user controls. Each of
these user controls inherits from a common base class and the controls are
loaded based on application state, status, etc and the specific type of
control frequently changes. I have a common event in the base class that
each child user control inherits from and that the page wires up and uses to
get status from the child user control. I hope all pretty simple and not too
far out there....
I am loading and wiring the control in the Page_Load event or during a
secondary event in reponse to a button click on the page (in the page
class). The user control is added to a place holder control on the page.
This all works fine but somehow I am not receiving the initial invocation on
of the event on the child user control. It does work the second time around.
Bottom line: during which event on a page should I be loading and wiring
events on a dynamically loaded user control?
Any help on this would be appriciated.
-Andy
these user controls inherits from a common base class and the controls are
loaded based on application state, status, etc and the specific type of
control frequently changes. I have a common event in the base class that
each child user control inherits from and that the page wires up and uses to
get status from the child user control. I hope all pretty simple and not too
far out there....
I am loading and wiring the control in the Page_Load event or during a
secondary event in reponse to a button click on the page (in the page
class). The user control is added to a place holder control on the page.
This all works fine but somehow I am not receiving the initial invocation on
of the event on the child user control. It does work the second time around.
Bottom line: during which event on a page should I be loading and wiring
events on a dynamically loaded user control?
Any help on this would be appriciated.
-Andy