Can not access control from nested master page in content page

adamgoldenrod

New Member
I am using nested master pages where i want to use \[code\]Label\[/code\] control from nested master page and update its text. but it is not accessing. When i removed outer master page then it is working fine. Following is the markup and code.OUTER MASTER\[code\]<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="Roster.Site" %>\[/code\]NESTED MASTER\[code\]<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="RoasterMaster.master.cs" Inherits="Roster.RoasterMaster" MasterPageFile="~/Site.Master" %><%@ MasterType VirtualPath ="~/Site.Master" %>\[/code\]CONTENT PAGE\[code\]<%@ Page Language="C#" AutoEventWireup="true" Inherits="RequestsView" CodeBehind="ViewRequestsByPM.aspx.cs" MasterPageFile ="~/Roaster/RoasterMaster.Master" Title ="Roaster- View Requests by PM" %><%@ MasterType VirtualPath ="~/Roaster/RoasterMaster.Master" %>\[/code\]CONTENT PAGE CODE\[code\]protected void Page_Load(object sender, EventArgs e){ Label lblTitle = new Label(); lblTitle =(Label)Master.FindControl("lblTitle"); lblTitle.Text = "View Roaster Request";}\[/code\]What is going wrong with the implementation. Please help. Thanks
 
Back
Top