c# - Changing parent page's title from user control -
I am a newbie for asp.net I have an asp.net page that uses user controls. In this control's page_load event, I want to change the title of the original aspx page. I need help on this.
You can try to create an asset in user control and the next call using this property You can. Your example of usercontrol
protected Zero Page_load (object sender, eventAggas E) {this.MyProperty = "This is a test" in UserRuntlals; } Public string MyProperty {get; Set; }
`in the page
protected zero page_load (object sender, event erggs e) {webusecure control 11.parenter + new event handler (web user Control 11_PreRender); } Zero WebUserControl11_PreRender (object sender, EventArgs e) {string str = WebUserControl11.MyProperty; This.Header.Title = str; }
Comments
Post a Comment