Saturday, September 4, 2010

Call parent function by User control ( by Reflection Class ) Asp.Net V Imp




Here is a simple command to invoke parent function from the User control

this.Page.GetType().InvokeMember("DisplayMessage", System.Reflection.BindingFlags.InvokeMethod, null, this.Page, new object[] { txtMessage.Text });


We need this most of the time when applying the facets at the page level. and the child components need to update the parent one,  As an example below.


No comments:

Post a Comment