Click to Rate and Give Feedback
MSDN
MSDN Library
Web Development
SDK Documentation
Platform
Reference
Class Library
Classes
Methods
 Add(String) Method

  Switch on low bandwidth view
Add(String) Method

The Add method of the SPWebCollection class creates a Web site object with the specified site-relative URL.

Parameters

strWebUrl   A string that contains the site-relative URL.

Return Value

A Microsoft.SharePoint.SPWeb object that represents the Web site.

Example

The following code example creates a site within the current 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

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Page view tracker