1 out of 2 rated this helpful - Rate this topic

Page.Master Property

Note: This property is new in the .NET Framework version 2.0.

Gets the master page that determines the overall look of the page.

Namespace: System.Web.UI
Assembly: System.Web (in system.web.dll)

public MasterPage Master { get; }
/** @property */
public MasterPage get_Master ()

public function get Master () : MasterPage

Property Value

The MasterPage associated with this page if it exists; otherwise, a null reference (Nothing in Visual Basic).

The Master property returns the MasterPage object associated with this page. This property is read-only; however, you can set properties on the MasterPage object it returns.

The Master property is valid only on pages that reference a master page in the MasterPageFile property. If you access the Master property on a page that does not reference a master page, a null reference (Nothing in Visual Basic) is returned.

Windows 98, Windows 2000 SP4, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ