I am working an Asp.net project, I am loading two user controls into another ascx control. First, I am loading the control1.ascx and then the control2. After loading both of them inside control2.ascx I want to access a function that reloads some data of control1. I am doing it with the following code:
private ASP.control1_ascx tree;
tree = (ASP.control1_ascx)LoadControl("control1.ascx");
tree.aload();
When I debug the code, it seems that it calls the aload() function and updates the data. But the problem is that I cannot see them after the function is called, instead I can see the correct data after a postback event. Why is this happens?. Is there a solution to see them when I call the function ?
Have you tried creating a delegate event in each of your user controls and then use this to rebind the data?
In your usercontrol:
In your Page_Load of ASPX
Implement code in this method to refresh the data in the user controls