注意:此属性在 .NET Framework 2.0 版中是新增的。
获取确定页的整体外观的母版页。
命名空间:System.Web.UI
程序集:System.Web(在 system.web.dll 中)
Public ReadOnly Property Master As MasterPage
Dim instance As Page
Dim value As MasterPage
value = instance.Master
public MasterPage Master { get; }
public:
property MasterPage^ Master {
MasterPage^ get ();
}
/** @property */
public MasterPage get_Master ()
public function get Master () : MasterPage
属性值
如果存在,则为与此页相关联的 MasterPage;否则为 空引用(在 Visual Basic 中为 Nothing)。
Master 属性返回与此页关联的 MasterPage 对象。此属性是只读的;但您可以设置它返回的 MasterPage 对象的属性。
只有在通过 MasterPageFile 属性引用母版页的页中,Master 属性才有效。如果在未引用母版页的页上访问 Master 属性,则将返回 空引用(在 Visual Basic 中为 Nothing)。
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
.NET Framework 并不是对每个平台的所有版本都提供支持。有关受支持版本的列表,请参见系统要求。
.NET Framework
受以下版本支持:2.0