How to access master page variable/property from the content page using C#
========MASTER PAGE CODE BEHIND
public string MasterPageVariable { get; set; }
========ASPX PAGE Source
<%@ MasterType VirtualPath="Maste Page Path" %>
========ASPX PAGE Code Behind
protected void Page_Load(object sender, EventArgs e)
{
Master.MasterPageVariable = "This text is written from Content page.";
}
Comments
Post a Comment