ASP.NET Forms – Get simple reference to masterpage properties

Put this directive in the top of your aspx file:
<%@ MasterType VirtualPath=”~/Templates/MasterPages/Default.Master” %>

The aspx-file gets reference to the masterpages properties in code-behind trough Master.PropertyName e.g:
this.Master.Heading

Leave a Reply