Click here to Skip to main content
15,905,587 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
my friends there is two usercontrol in my aspx page.but one of usercontrol dynamically loading

two usercontrol usercontrol_1
usercontrol_2(dynamically loading)

I want to do usercontrol_1 button click event, call usercontrol_2 page load event or any function.
Posted
Comments
ZurdoDev 4-Feb-15 14:22pm    
You never want to call Page_Load. You need to move the code you want into a method and then invoke the method.
Member-2338430 4-Feb-15 15:40pm    
so I want to do usercontrol_1 buttonclick event if I clicked button usercontrol_2 refresh but usercontrol_2 dynamically load in master page so I cant find it firstly like that
ContentPlaceHolder ph = (ContentPlaceHolder)Page.Master.FindControl("X");
USERCONTROL_2 asd= (USERCONTROL_2)ph.FindControl("USERCONTROL_21");
asd.Refresh();
if I can found call it function
Member-2338430 4-Feb-15 15:46pm    
I use for usercontrol_1 buttonclick event some data insert the database
usercontrol_2 use for get these data
but if I click usercontrol_1 button click event some data insert database I want to show same time in usercontrol_2 get thse data but not work I must do page refresh for to see.

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