SPWeb.IsRootWeb property

Gets a Boolean value that indicates whether the site is the top-level website of the site collection.

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


Public ReadOnly Property IsRootWeb As Boolean
Dim instance As SPWeb
Dim value As Boolean

value = instance.IsRootWeb
public bool IsRootWeb { get; }

Property value

Type: System.Boolean
true if the site is the top-level website; otherwise, false.

See also


SPWeb class

SPWeb members

Microsoft.SharePoint namespace