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

Popular posts from this blog

GROUP BY, CUBE, ROLLUP and SQL SERVER 2005

How to get content of Ckeditor & Fckeditor using Javascript

How to Fix Error- Sys.WebForms.PageRequestManagerTimeoutException - The server request timed out