I have two usercontrols. One is loaded statically another dynamically.
In the aspx page I can write as follows for static user control.
ProgramAddSchedule.onNewProgram += new AddProgram.OnNewProgramClick(onNewProgram_btnHandler);
But dynamically loaded control’s event I am not able to get
Control myUserControl = (Control)Page.LoadControl("~/View/EditScheduleProgram.ascx");
How do I get the event of the dynamically loaded control?
Assuming the name of the type follows the name of the file, you can strongly-type it to that type, such that,
Then you have access to any custom (or specific) events exposed by that type but not by
Control, so,