MasterPage.Master Property
Gets the parent master page of the current master in nested master pages scenarios.
Assembly: System.Web (in System.Web.dll)
The Master property is read-only, because master page hierarchies cannot be built at run time.
| Topic | Location |
|---|---|
| How to: Reference ASP.NET Master Page Content | Building ASP .NET Web Applications |
| How to: Reference ASP.NET Master Page Content | Building ASP .NET Web Applications |
| How to: Reference ASP.NET Master Page Content |
This section contains three code examples. The first code example demonstrates how to create a nested master page. The second code example demonstrates how to reference the master page that was created in the first code example. The third code example demonstrates how to use a content page to reference the master page that was created in the second code example.
The following code example demonstrates how to create a nested master page and represents the parent master page named ParentMasterPage_1.
The following code example demonstrates how to use a nested master page named ChildMasterPage_1 that references the master page that was created in the preceding code example.
The following code example demonstrates how to use a content page named ContentPage that references the ChildMasterPage_1 that was created in the preceding code example.
Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98
The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.