SP.Web Methods

Applies to: SharePoint Foundation 2010

The following table lists the methods of the SP.Web class.

Methods

Name

Description

applyWebTemplate

Applies the specified site definition or site template to the website that has no template applied to it.

deleteObject

Deletes the Web site.

doesUserHavePermissions

Returns whether the current user has the given set of permissions.

ensureUser

Adds the user with the specified login name to the website.

getAvailableWebTemplates

Returns a collection of site templates available for the site.

getCatalog

Gets the list template gallery, site template gallery, or Web Part gallery for the website.

getChanges

Returns the collection of all changes from the change log that have occurred within the scope of the site, based on the specified query.

getFileByServerRelativeUrl

Returns the file object located at the specified server-relative URL.

getFolderByServerRelativeUrl

Returns the folder object located at the specified server-relative URL.

getSubwebsForCurrentUser

Returns the collection of child sites of the current site based on the specified query.

initPropertiesFromJson

This member is reserved for internal use and is not intended to be used directly from your code.

mapToIcon

Returns the name of the image file for the icon that is used to represent the specified file.

update

Updates the database with changes that are made to the Web site.

Web

This member is reserved for internal use and is not intended to be used directly from your code.

Applies To

SP.Web Class

See Also

Reference

SP.Web Properties

SP Namespace