Click here to Skip to main content
15,890,345 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello

i load user control in my page with following code


C#
UserControl com = (UserControl)LoadControl("~/Sample.ascx");
            pnlLoadCom.Controls.Add(com);




i wan to call method from all daynamic User controls with parameter and get param from this method whene I click button on my page . how can do this?
Posted
Comments
CodeBlack 21-Aug-13 9:15am    
does all your UserControl's have same method name with same number of parameters ?
What is your exact requirement ?
tree1371 21-Aug-13 9:18am    
yes . all my UserControl's Have same method "SaveParams" with one parameter "ParamName";
CodeBlack 21-Aug-13 9:20am    
what is your exact requirement ?
tree1371 21-Aug-13 9:23am    
I have many user control and one page . when i click on name of User control i want to Load my user control and set parameter for it's settings and i want to when i click on button save on page get string value of user control for save to database.
CodeBlack 21-Aug-13 9:27am    
and what your method inside UserControl will do ?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900