Exposing a server control from a master page as a public property (C#)
<%@ Page Language="C#" MasterPageFile="~/Default.master" %> <%@ MasterType VirtualPath="~/Default.master" %> <script runat="server" language="C#"> protected void Page_Load(object sender, EventArgs e) { Master.MasterPageLabel.Font.Size = 25; } </script> File: Default.master <%@ Master Language="VB" %> <script runat="server" language="C#"> public Label MasterPageLabel { get { return Label1; } set { Label1 = value; } } </script> <asp:Label ID="Label1" Runat="server" />