Ok, please understand the architecture here first.
- OurMasterPage.aspx has user control Header.ascx
- Header.ascx has a user control in it called LandingPageTopNav
- LandingPageTopNav.ascx has a public property named "LandingPage" that is there to be able to set by the user using this control.
- And I have a Third.aspx page in which I need to set the LandingPageTopNav property to a LandingPage object
The problem is that I can't get this to work in my ThirdPage.aspx.cs:
Master.LandingPageTopNav.LandingPage = this.landingPage;
Master.LandingPageTopNav.Visible = true;
And that is, I can't get the first line to work where I'm trying to reference the LandingPage property. The second line is fine. My Third.aspx definitely can reference my master page objects otherwise from code-behind.