f you have Master page for your website then you must be needing reference to its controls from the child content page. There are various ways to do it. To get strong access between master and content page you can add @ MasterType directive to your content page. For example if your Page directive has masterPageFile = ” ~/MyMasterPage.master” , then you have to add following line to aspx page.
Now you can access public properties of master page from content page. To locate specific control we can use FindControl method:
Label myHeaderLabel = (Label) Master.FindControl(“lblmasterHeader”);// lblmasterHeader is the ID of label
But do note one more thing. If the control is inside a ContentPlaceHolder then you have to handle it separately. When at run time content page merges with the Master page layout then IDs of the controls change. Suppose actual ID of a textbox is “txtUserName” then it will be render as something like “ctl00_ContentPlaceHolder1_txtUserName” where ContentPlaceHolder1 is the ID of ContentPlaceHolder. So we have to first find the ContentPlaceHolder then textbox hierarchically. e.g.