# Tuesday, September 29, 2009
« Catching up is hard to do... | Main | Employment screenings and coaching »

When using master pages, there are times when you want to access part of the Master Page (e.g. a public property). One way of doing this is by defining the master page with the MasterType directive.

<%@ MasterType VirtualPath="~/MyMasterPage.master"%>

By doing this, you can now access the MasterPage as a class Master, and programatically (and with the benefits of compilation checking) access it.

Comments are closed.