Add Method

The Add method of the SPFolderCollection class adds the folder located at the specified URL to the collection.

Parameters

strUrl   A string that specifies the URL of the folder.

Return Value

A Microsoft.SharePoint.SPFolder object that represents the folder.

Example

The following code example adds a folder to the specified site collection.

This example requires using directives (Imports in Visual Basic) for both the Microsoft.SharePoint and Microsoft.SharePoint.WebControls namespaces.

Requirements

Platforms: Microsoft Windows Server 2003

Security: Code Access Security