How to Invoke function in user control from parent page asp.net

hoodontop

New Member
Asp.Net 4.0Is it possible to call a function in a user control from the parent page in code behind?The user controls are created by other programmers, however each will have a common public function that i look for called "Output" which returns values in need for the main page. The main page has a main menu, so only one user control will display based upon the main menu selection.Folder in WebApp with user controls:\[code\]> UserControls ProductA.ascx ProductB.ascx ProductC.ascx ProductD.ascx etc...\[/code\]Code behind when user clicks a menu button:\[code\]Dim product As string = Session("MenuProduct")Dim uc As UserControluc = LoadControl("~/UserControls/" & product & ".ascx")InputPanel.Controls.Add(uc)\[/code\]Function in user control I would like to access. This will be a common Function.\[code\]Public Function Output(ByVal ParamArray expr() As Object) As Object ...codeEnd Function\[/code\]
 
Back
Top