home / software / tips and tricks / How to access Master page variable and chang values from a content page?

How to access Master page variable and chang values from a content page?

Updated:  01/27/2011 17:01 PM
Author:  Shiju Mathews

Status:    Resolved.


Consider a master page MasterPage.Mater and a child page Home.aspx that is using the Master page.

Also the Master Page has a variable called userID. To access this variable, first expose this variable with properties inside the master page.



ON Childpage(Home.aspx) access this properties as



On Child page you can accees UserNo as


OR set the user number as


We can use this methodology to access any property, methods or controls from the master Page from the content pages that is using the master Page.

Tags: How to access Master page variable and chang values from a content page?
Updated on: October 2024