共用方式為


SPWeb.ParentWeb property

取得指定網站的上層網站。

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'宣告
Public ReadOnly Property ParentWeb As SPWeb
    Get
'用途
Dim instance As SPWeb
Dim value As SPWeb

value = instance.ParentWeb
public SPWeb ParentWeb { get; }

Property value

Type: Microsoft.SharePoint.SPWeb
表示父網站的SPWeb物件。

請參閱

參照

SPWeb class

SPWeb members

Microsoft.SharePoint namespace