I have a Web Form that uses Master Pages. I only tell you this part so you understand the layers.
On the page, I have a web user control. I can see public methods on that user control by simply calling userControlName.PublicMethod();
However, there is a button on this page which generates additional content. This content is based on a placeholder control and adding additional web user controls :
private void buildSubForms()
// load in the Lesson Topic Sub Form
subForm = LoadControl("~/siteAssets/controls/ilasLT.ascx");
// load in the Reference Material Sub Form
subForm = LoadControl("~/siteAssets/controls/ilasRM.ascx");
Now, on the main form, I want a submit button that will call a public method of each "subForm" that was added at runtime.
I have tried various forms of Control C = This.Page.Master.FindControl("cpBody").Findcontrol("ctl01")... etc, but can never seen to get the right combination.
I am sure more info
View Complete Post