SPWeb methods

The SPWeb type exposes the following members.

Methods

  Name Description
Public method AddApplicationPrincipal Adds a user to the website as an application principal; that is, a user object that is delegated to act on behalf of an external application.
Public method AddProperty Adds a property to the list of metadata for the website.
Public method AddSupportedUICulture Adds culture-specific information to the list supported by the website.
Public method AllowAllWebTemplates Resets the available web templates on the website to the complete set of web templates.
Public method ApplyTheme(String) Obsolete. Applies a theme to a website.
Public method ApplyTheme(String, String, String, Boolean) Applies a theme with the specified components to this site.
Public method ApplyWebTemplate(String) Applies the specified site definition or site template to the website that has no template applied to it.
Public method ApplyWebTemplate(SPWebTemplate) Applies the specified site definition object or site template object to the website that has no template applied to it.
Public method BreakRoleInheritance(Boolean) Creates unique role assignments for the object and optionally copies role assignments from the parent. (Inherited from SPSecurableObject.)
Public method BreakRoleInheritance(Boolean, Boolean) Creates unique role assignments for the website, optionally copies role assignments from the parent website, and optionally clears unique role assignments from descendants. (Overrides SPSecurableObject.BreakRoleInheritance(Boolean, Boolean).)
Public method BypassUseRemoteApis Accesses the website by bypassing the SOAP, WebDAV and Microsoft Office SharePoint Designer 2007 interfaces.
Public method CheckPermissions Determines whether the current user has a specified set of permissions. (Inherited from SPSecurableObject.)
Public method Close Closes the website at the end of a request and releases resources.
Public method CreateDefaultAssociatedGroups Creates an owner group.
Public method CustomizeCss Customizes the specified style sheet for the website.
Public method Delete Deletes the website.
Public method DeleteProperty Deletes a property from the list of metadata for the website.
Public method Dispose Releases all resources used by the current instance of the website.
Public method DoesPushNotificationSubscriberExist Checks whether the push notification subscriber exist for the current user with the given device application instance ID.
Public method DoesUserHavePermissions(SPBasePermissions) Indicates whether the current user has a specified set of permissions. (Inherited from SPSecurableObject.)
Public method DoesUserHavePermissions(String, SPBasePermissions) Indicates whether the specified user has a specified set of permissions.
Public method EnsureUser Checks whether the specified logon name belongs to a valid user of the website, and if the logon name does not already exist, adds it to the website.
Public method Equals (Inherited from Object.)
Public method ExportUserResources Exports user resources for a given language.
Protected method Finalize (Inherited from Object.)
Public method GetAppInstanceById Retrieves an AppInstance installed on this Site.
Public method GetAppInstancesByProductId Retrieves all AppInstances installed on this site that are instances of the specified App.
Public method GetAvailableCrossLanguageWebTemplates Returns the collection of available cross-language web templates.
Public method GetAvailableWebTemplates(UInt32) Gets the Web templates that are available for creating subsites beneath the website, based on the specified locale identifier (ID).
Public method GetAvailableWebTemplates(UInt32, Boolean) Gets the site templates that are available for creating subsites beneath the website, based on the specified locale identifier (ID) and whether to include language-neutral site templates.
Public method GetCatalog Gets the list template gallery, site template gallery, or Web Parts page gallery for the website.
Public method GetChanges() Gets all of changes listed in the current change log for the website.
Public method GetChanges(SPChangeQuery) Gets changes from the change log filtered by the specified query.
Public method GetChanges(SPChangeToken) Gets the changes starting from a specified point in the change log.
Public method GetChanges(SPChangeToken, SPChangeToken) Gets the changes logged over a specified period of time.
Public method GetFieldLocalizations Returns the collection of localizations for the website for the specified culture.
Public method GetFile(Guid) Gets the file object with the specified identifier (ID).
Public method GetFile(String) Retrieves the file object located at the specified URL.
Public method GetFileAsString Gets the contents of the file object located at the specified URL as a string.
Public method GetFileOrFolderObject Retrieves a file or folder on the website with the specified URL.
Public method GetFilePersonalizationInformation Returns the file level of a specified document as output parameters and also returns a value that specifies whether the document has personalized Web Parts.
Public method GetFolder(Guid) Retrieves the folder object with the specified GUID.
Public method GetFolder(String) Gets the folder that is located at the specified URL.
Public method GetHashCode (Inherited from Object.)
Public method GetLimitedWebPartManager Returns the limited Web Part Manager for the specified Web Part page and view.
Public method GetList Gets the list that is associated with the specified server-relative URL.
Public method GetListFromUrl Gets the list that is associated with the first Web Part on the specified Web Parts page. Beginning in Windows SharePoint Services 3.0, use the GetListFromWebPartPageUrl method instead of this method.
Public method GetListFromWebPartPageUrl Gets the list that is associated with the first Web Part on the specified Web Parts page.
Public method GetListItem Gets the list item that is associated with the specified server-relative URL.
Public method GetListItemFields Gets the list item that is associated with the specified server-relative URL, returning data for only the specified fields.
Public method GetListsOfType Gets the lists of the specified type.
Public method GetObject Retrieves a file, folder, or list item that is associated with the specified URL.
Public method GetProperty Gets the value of a property with the specified key from the list of metadata for the website.
Public method GetPushNotificationSubscriber Gets the push notification subscriber over the site for the specified device application instance ID.
Public method GetPushNotificationSubscribersByArgs Queries for the push notification subscribers over the site for the specified value of custom arguments. Null or empty custom arguments will return subscribers without any filtering.
Public method GetPushNotificationSubscribersByUser Queries for the push notification subscribers over the site for the specified user.
Public method GetRecycleBinItems Gets the recycle bin items that are based on the specified query.
Public method GetServerRelativeUrlFromUrl Given a full, server relative or web relative url, returns a server relative url that always starts with a slash.
Public method GetSiteAppPrincipals Get the app principals in the site collection.
Public method GetSiteData Gets the list items across multiple lists, which can be located in multiple websites in the same website collection.
Public method GetSubwebsForCurrentUser() Gets the subsites beneath the current site of which the current user is a member.
Public method GetSubwebsForCurrentUser(Int32) Gets the subsites beneath the current website of which the current user is a member based on the specified site definition.
Public method GetSubwebsForCurrentUser(Int32, Int16) Gets the subsites beneath the current website in which the current user is a member, based on the specified site definition and configuration.
Public method GetType (Inherited from Object.)
Public method GetUsageData(SPUsageReportType, SPUsagePeriodType) Gets a table that contains information about the usage of a website, based on the specified report type and time interval.
Public method GetUsageData(SPUsageReportType, SPUsagePeriodType, Int32, DateTime) Gets a table that contains information about the usage of a website based on the specified report type, time interval, number of columns to display, and last day to display.
Public method GetUserEffectivePermissionInfo Gets the effective permissions that the specified user has and the role assignments related to this user within this scope. (Overrides SPSecurableObject.GetUserEffectivePermissionInfo(String).)
Public method GetUserEffectivePermissions Gets the effective permissions that the specified user has within the current application scope. (Overrides SPSecurableObject.GetUserEffectivePermissions(String).)
Public method GetUserToken Retrieves the user token for the specified user.
Public method GetViewFromUrl Gets a view of a list within the site based on the specified URL.
Public method GetWebPartCollection Obsolete. Use the GetLimitedWebPartManager method of the SPFile class to return an SPLimitedWebPartManager object to manage Web Parts instead. (In Windows SharePoint Services 2.0 the GetWebPartCollection method returned the collection of Web Parts on the page at the specified URL.)
Public method GetWebsAndListsWithUniquePermissions Retrieves a collection of Webs and Lists that either have unique permissions themselves or have items with unique permissions.
Public method ImportUserResources Imports user resources for the specified language.
Public method InsertAlertEvent(Guid, String, Int32, SPReusableAcl) Inserts an event in the events table for the specified custom prematching GUID, event data, event type, and reusable access control list (ACL).
Public method InsertAlertEvent(Guid, String, Int32, []) Inserts an event in the events table for the specified custom prematching GUID, event data, event type, and access control list (ACL).
Public method IsCurrentUserMemberOfGroup Gets whether the current user is a member of the specified group.
Public method LoadAndInstallApp Uploads and installs an app package.
Public method LoadAndInstallAppInSpecifiedLocale Uploads and installs an App package, in a specified locale.
Public method LoadApp Uploads an App package and creates an instance from it.
Protected method MemberwiseClone (Inherited from Object.)
Public methodStatic member OriginalBaseUrl Returns the base URL for the current request.
Public method ProcessBatchData Processes the specified commands for sending multiple requests to the server per transaction.
Public method RecalculateWebFineGrainedPermissions Recalculates whether the website contains a list or list item that has unique permissions, and updates the value of the AllowAutomaticASPXPageIndexing property.
Public method Recycle Sends the website to the recycle bin.
Public method RegisterPushNotificationSubscriber Registers the subscriber for push notifications over the site. If the registration already exists, the service token is updated with the new value.
Public method RemoveExternalSecurityProvider Obsolete. Removes the external security provider for the website.
Public method RemoveSupportedUICulture Removes support for the specified culture (locale) from the website.
Public method ResetRoleInheritance Resets the local role assignments so the website, and all it's descendant objects, re-inherit role assignments from the parent website. (Overrides SPSecurableObject.ResetRoleInheritance().)
Public method RevertAllDocumentContentStreams Restores all files within the website to their original, uncustomized state so that their logic becomes cached in memory (also known as "ghosted") rather than stored within the database.
Public method RevertCss Reverts style sheet customization of a file to the default style sheet.
Public method SaveAsTemplate Saves the website as a site template solution.
Public method SearchDocuments(String) This class or member is deprecated. When you upgrade or write new applications that use this class or member, use the new class or member instead. Use the Execute method of the Microsoft.SharePoint.Search.Query.KeywordQuery class or the FullTextSqlQuery class instead.
Public method SearchDocuments(String, UInt32, SPSearchResultCollectionPosition) This class or member is deprecated. When you upgrade or write new applications that use this class or member, use the new class or member instead. Use the Execute method of the Microsoft.SharePoint.Search.Query.KeywordQuery class or the FullTextSqlQuery class instead.
Public method SearchListItems(String) This class or member is deprecated. When you upgrade or write new applications that use this class or member, use the new class or member instead. Use the Execute method of the Microsoft.SharePoint.Search.Query.KeywordQuery class or the FullTextSqlQuery class instead.
Public method SearchListItems(String, UInt32, SPSearchResultCollectionPosition) This class or member is deprecated. When you upgrade or write new applications that use this class or member, use the new class or member instead. Use the Execute method of the Microsoft.SharePoint.Search.Query.KeywordQuery class or the FullTextSqlQuery class instead.
Public method SetAvailableCrossLanguageWebTemplates Specifies a set of language-neutral Web templates that are available for creating subsites below the website, regardless of locale.
Public method SetAvailableWebTemplates Specifies the Web templates that are available for creating subsites below the website for the specified locale.
Public method SetProperty Sets the value of a property with the specified key in the list of metadata for the website.
Public method ToString Returns the title of the website. (Overrides Object.ToString().)
Public method UnregisterPushNotificationSubscriber Unregisters the subscriber for push notifications from the site.
Public method Update Updates the database with changes that are made to the website.
Public method ValidateFormDigest Validates the form digest control that is used in the current request.

Top

See also

Reference

SPWeb class

Microsoft.SharePoint namespace