Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Inside User Control

((parentPage)Parent.Page).callChildMethod();



As above i called a method which assigns parent control Label to new values, i debug the code and it showed me the value is changed correctly which is to be, when the method call gets over it comes inside the user control again and leaves the User control but when the page doesnot showing the changed values unless we give click on the parent page to load again.


Method inside Parent Page which Holds User Control



public void callChildMethod()
{
Label1.text="value";
}
Posted

1 solution

Are you any AJAX controls (like UpdatePanel) in your page for refreshing the data?

Also, a better way to notify the parent page about the label change will be using events.
 
Share this answer
 

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