Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The AllWebs property of the SPSite class gets the collection of all Web sites contained within the site collection, including the top-level site and its subsites.
Property Value
A Microsoft.SharePoint.SPWebCollection object that represents the Web sites.
Example
The following code example displays in a console application the number of sites in a site collection.
Requirements
Platforms: Microsoft Windows Server 2003
Security: Code Access Security