You can try to create a property in usercontrol and then call this property using your usercontrol instance on the page, for example
In UserControl
protected void Page_Load(object sender, EventArgs e) { this.MyProperty = "This is a test"; } public string MyProperty { get; set; }
`On the page
protected void Page_Load(object sender, EventArgs e) { WebUserControl11.PreRender += new EventHandler(WebUserControl11_PreRender); } void WebUserControl11_PreRender(object sender, EventArgs e) { string str = WebUserControl11.MyProperty; this.Header.Title = str; }
pedrofernandes
source share