You can access your masterpage from current page and cast it to your class type:
MyMasterPage master = Master as MyMasterPage;
var value = master.NeededProperity;
Looks like here in MSDN in comments:
Public property is a good way to go, but one would have to put the MasterType directive in every content page (the .aspx file). If content pages extend a base class (which extends Page), then the same strong typing can be done in the base class CodeBehind. For example:
// MySiteMaster : System.Web.UI.MasterPagepublic
string Message
{
get
{
return MessageContent.Text;
}
set
{
MessageContent.Text = value;
}
}
// MyPage : System.Web.UI.Page
MySiteMaster masterPage = Master as MySiteMaster;
masterPage.Message = "Message from content page";
MessageContent is a control on the master page. The MyPage class could expose Message as its own property or allow derived classes to access it directly.