Access a user control properties in a master page
I am stuck on this. I migrated a .Net 1.1 web application to .Net 2.0 and I want to take advantage of the Masterpage model. I don’t want to rewrite everything so I want to keep some user controls (like headers and footers) embedded in the Master page. However I don’t get the right way to set from my code (VB.Net) the public properties of my user control. Imagine something like this: Masterpage: <%@ Master Language="VB" CodeFile="MasterPage.master.vb" Inherits="MasterPage" %><%@ Register TagPrefix="Myapp" TagName="Footer" Src="~/Includes/Footer.ascx" %>…. <body><Myapp:Footer id=”Footer1” ShowDetails=”false” runat=server />…</body>
Footer.ascx is the user control where I define a public property ShowDetails, straightforward until there!Now if I create an aspx page with the master page, how from this page can I change the property ShowDetails? (something I do easily with ASP.Net 1.1)
I tried of course to cast the user control but unless some use of Reflection I don't see how I can type the control.
Any idea?