How can invoke user control’s public method from within the page?
I load the control dynamically inside OnInit on the page.Any ideas? For some reason I am getting a build error that says that the method doesn’t exist, even though it’s public. Starting to think that user controls are not worth all the hassle.
You’ve said
you need to say
Note that
fracTemplateCtrl isdeclared as aFracTemplateCtrl, so visual studio knows that it has aTestMethod(). When it is declared as aControl, visual studio can’t make this assumption.