Hi,
I am having difficulties trying to find a control which exists on a page which uses a mater page (nested) but is declared on one of the master pages. To make it easier to understand here's how my code is set up.
I have two master pages:
-
MasterBase
-
MasterPage
The MasterPage has a Content control which plugs straight into MasterBase's ContentPlaceHolder. The MasterPage's Content control contains ContentPlaceHolder so that ASPX pages that inherit this MasterPage can plug their Content(s) into those ContentPlaceHolders.
Home.aspx, which I have created uses the MasterPage - and in Content control of the Home.aspx file I have a couple of controls like Label (let's say ID="lblContent1") or Buttons and etc.
What I need to be able to do is, from MasterBase, detect if the page (being rendered) contains certain controls. So for example, in MasterBase's codebehind, I want to look for a control called "lblContent1" and if it does exist, I want to populate it with some data.
Right now, I haven't been successful at doing this. How can I achieve this?
Thanks