Condividi tramite


SPWeb Members

Include Protected Members
Include Inherited Members

Represents a SharePoint Foundation website.

The SPWeb type exposes the following members.

Properties

  Name Description
Public property Alerts Gets the collection of alerts for the site or subsite.
Public property AllowAnonymousAccess Gets a Boolean value that indicates whether anonymous access is allowed for the website.
Public property AllowAutomaticASPXPageIndexing Gets or sets a Boolean value that specifies whether the .aspx page within the website should be indexed by the search engine.
Public property AllowDesignerForCurrentUser Gets a Boolean value that specifies whether the current user is allowed to use the designer for this website. The default value is false.
Public property AllowMasterPageEditingForCurrentUser A Boolean value that specifies whether the current user is allowed to edit master pages.
Public property AllowRevertFromTemplateForCurrentUser A Boolean value that specifies whether the current user is allowed to revert the site from the template.
Public property AllowRssFeeds Gets a Boolean value that specifies whether the website allows RSS feeds.
Public property AllowUnsafeUpdates Gets or sets a Boolean value that specifies whether to allow updates to the database as a result of a GET request or without requiring a security validation.
Public property AllProperties Gets a hash table that contains metadata for the website.
Public property AllRolesForCurrentUser Gets a full list of role definitions on the object to which the current user belongs on this scope. (Inherited from SPSecurableObject.)
Public property AllUsers Gets the collection of user objects that represents all users who are either members of the site or who have browsed to the site as authenticated members of a domain group in the site.
Public property AllWebTemplatesAllowed Gets a Boolean value that indicates whether the available Web templates that are returned by the GetAvailableWebTemplates method comprise the complete set of templates.
Public property AlternateCssUrl Gets or sets the URL for an alternate cascading style sheet (CSS) to use in the website.
Public property AlternateHeader Gets or sets the URL for an alternate .aspx page that will be used to render the top navigation area in SharePoint Foundation pages.
Public property AnonymousPermMask64 Gets or sets the base permissions for anonymous users of the website. (Read-only in sandboxed solutions.)
Public property AnonymousState Gets or sets the level of access for anonymous users on the website.
Public property ASPXPageIndexed Gets a Boolean value that specifies whether the .aspx pages of the website are automatically indexed.
Public property ASPXPageIndexMode Gets or sets the .aspx page indexing that is used by the website.
Public property AssociatedGroups Gets a list of the groups that are associated with the website.
Public property AssociatedMemberGroup Gets the users who have been given contribute permissions to the website.
Public property AssociatedOwnerGroup Gets or sets the associated owner groups of the website.
Public property AssociatedVisitorGroup Gets or sets the associated visitor group of the website.
Public property Audit Gets the audit log that is associated with the website.
Public property AuthenticationMode Obsolete. Reserved for internal use.
Public property Author Gets or sets a user object that represents the user who created the website. (Read-only in sandboxed solutions.)
Public property AvailableContentTypes Gets the collection of all content type templates that apply to the current scope, including those of the current website, as well as any parent websites.
Public property AvailableFields Gets the collection of the available fields of the website.
Public property CacheAllSchema Gets or sets a Boolean value that specifies whether caching of all schemas on the website is enabled.
Public property ClientTag The client cache control number (client tag) for this website.
Public property Configuration Gets either the identifier (ID) of the site definition configuration that was used to create the site, or the ID of the site definition configuration from which the site template used to create the site was derived.
Public property ContentTypes Gets the collection of content types for the website.
Public property Created Gets or sets a date and time value that indicates when the site was created. (Read-only in sandboxed solutions.)
Public property CurrencyLocaleID Gets the locale identifier (LCID) that is used for currency in the website.
Public property CurrentChangeToken Gets the change token that is used when the next change is logged to the website.
Public property CurrentUser Gets the current user of the site.
Public property CustomJavaScriptFileUrl The custom ECMAScript (JavaScript, JScript) file URL used by the CustomJsUrl web control.
Public property CustomMasterUrl Gets or sets the URL for a custom master page file to apply to the website.
Public property CustomUploadPage Gets or sets the path to a custom application page for uploading files.
Public property DataRetrievalServicesSettings Obsolete. Gets an object that represents the data retrieval service settings for the deployment of SharePoint Foundation.
Public property Description Gets or sets the description for the site.
Public property DescriptionResource Gets an SPUserResource object that represents the translations for the description of the site.
Public property DocTemplates Gets the collection of document templates that are used on the site.
Public property EffectiveBasePermissions Gets the effective base permissions that are assigned to the current user. (Overrides SPSecurableObject.EffectiveBasePermissions.)
Public property EffectivePresenceEnabled Gets a Boolean value that indicates whether effective presence information is enabled on the site.
Public property EmailInsertsEnabled Obsolete. Gets a Boolean value that indicates whether document libraries on the virtual server can accept e-mail attachments from public folders.
Public property EventHandlersEnabled Obsolete. Gets a Boolean value that indicates whether Windows SharePoint Services 2.0 event handlers can be used on the site.
Public property EventReceivers Gets the collection of event receiver definitions that are currently available on the website.
Public property ExcludeFromOfflineClient Gets or sets a value that indicates whether the data from the website should be downloaded to the client during offline synchronization.
Public property ExecuteUrl Gets the URL that is called after the site definition for a business solutions site is instantiated.
Public property Exists Gets a Boolean value that indicates whether the website exists.
Public property ExternalSecurityProviderSetting Obsolete. Gets the settings that are used by an external security provider for the site.
Public property Features Gets the collection of Features that are currently activated in the website.
Public property Fields Gets the collection of field objects that represents all the fields in the website.
Public property FieldTypeDefinitionCollection Gets the collection of SPFieldTypeDefinition objects that represents type definition information for the fields of the website.
Public property FileDialogPostProcessorId Gets or sets the Class Identifier (CLSID) for the user interface element that is used for Web views in the file dialog boxes and forms of document libraries.
Public property Files Gets the collection of all files in the root directory of the website.
Public property FirstUniqueAncestor Obsolete. Use the FirstUniqueAncestorSecurableObject property instead. (Inherited from SPSecurableObject.)
Public property FirstUniqueAncestorSecurableObject An ISecurableObject interface that represents the first unique ancestor website. This is the object where the ACL is defined. For a web with unique permission the First Unique Ancestor is itself. For a web that inherits permissions the First Unique Ancestor is one of the ancestral webs. (Overrides SPSecurableObject.FirstUniqueAncestorSecurableObject.)
Public property FirstUniqueAncestorWeb Gets the first parent website that has unique permissions.
Public property FirstUniqueRoleDefinitionWeb Gets the website where the role definitions for the current site were defined.
Public property Folders Gets the collection of all first-level folders in the website.
Public property Groups Gets a collection that contains all the groups for the website.
Public property HasExternalSecurityProvider Obsolete. Gets a Boolean value that indicates whether the site uses an external security provider.
Public property HasUniquePerm Obsolete. Gets or sets a Boolean value that specifies whether the site has unique permissions.
Public property HasUniqueRoleAssignments Indicates whether the object has unique role assignments or inherits its role assignments from a parent object. (Inherited from SPSecurableObject.)
Public property HasUniqueRoleDefinitions Gets a Boolean value that indicates whether the role definitions are uniquely defined for this website or inherited from a parent website.
Public property ID Gets the GUID for the site.
Public property IncludeSupportingFolders Gets or sets a Boolean value that specifies whether supporting folders for files or folders in the site are included in enumerations of files or folders.
Public property IsADAccountCreationMode Gets a Boolean value that indicates whether user accounts are automatically created in Active Directory Domain Services (AD DS) when users are invited to the website.
Public property IsADEmailEnabled Gets a Boolean value that indicates whether e-mail for Active Directory Domain Services (AD DS)is enabled on the site.
Public property IsMultilingual Gets or sets a value that indicates whether a multilingual user interface is enabled for the website.
Public property IsRootWeb Gets a Boolean value that indicates whether the site is the top-level website of the site collection.
Public property Language Gets the locale identifier (LCID) for the default language of the website.
Public property LastItemModifiedDate Gets or sets the date and time that an item was last modified in the site. (Read-only in sandboxed solutions.)
Public property Lists Gets the collection of all lists that are contained in the website.
Public property ListTemplates Gets the collection of all list definitions and list templates that are available for creating lists on the website.
Public property Locale Gets or sets the locale that is used when time, currency and numeric fields are rendered on the website.
Public property MasterPageReferenceEnabled Retrieves a Boolean value that indicates whether the website is enabled for master page referencing.
Public property MasterUrl Gets or sets the URL of the master page that is used for the website.
Public property Modules Gets the collection of modules that are used on the website.
Public property Name Gets or sets the name of the website.
Public property Navigation Gets a navigation object that represents navigation on the website, including the Quick Launch area and the top navigation bar.
Public property NoCrawl Gets or sets a Boolean value that specifies whether searching is enabled for the website.
Public property OverwriteTranslationsOnChange Gets and sets a Boolean value that indicates whether changes made to user-specified text in the default language should automatically overwrite existing translations made in all alternate languages.
Public property ParentWeb Gets the parent website of the specified website.
Public property ParentWebId Gets the identifier (ID) of the parent website for the site.
Public property ParserEnabled Gets or sets a value that specifies whether parsing is enabled for document libraries of the website.
Public property Permissions Obsolete. Gets the collection of permissions for the website.
Public property PortalMember Gets a Boolean value that indicates whether the website is associated with a portal site.
Public property PortalName Gets the name of a portal site that is associated with the site.
Public property PortalSubscriptionUrl Gets the URL that is used for alerts within a portal.
Public property PortalUrl Gets the URL to a portal site that is associated with the site.
Public property PresenceEnabled Gets or sets a Boolean value that specifies whether inline presence information is enabled on the website.
Public property Properties Gets a SPPropertyBag object with the metadata for the website.
Public property Provisioned Gets a Boolean value that indicates whether the website has been provisioned.
Public property PublicFolderRootUrl Obsolete. Gets the URL of the public folder that is used for e-mail attachments in document libraries.
Public property QuickLaunchEnabled Gets or sets a Boolean value that specifies whether the Quick Launch area is enabled on the website.
Public property RecycleBin Gets the recycle bin of the website.
Public property RecycleBinEnabled Gets or sets a value that determines whether the recycle bin is enabled for the website.
Public property RegionalSettings Gets the regional settings that are currently implemented on the website.
Public property RequestAccessEmail Gets or sets the e-mail address to which requests for access are sent.
Public property RequestAccessEnabled Gets a Boolean value that indicates whether request for access to the website is enabled.
Public property ReusableAcl Gets the reusable access control list (ACL) for the website. (Overrides SPSecurableObject.ReusableAcl.)
Public property RoleAssignments Gets the role assignments for this securable object. (Inherited from SPSecurableObject.)
Public property RoleDefinitions Gets the collection of role definitions for the website.
Public property Roles Obsolete. Use the RoleDefinitions property to get the collection of role definitions for a website. In Windows SharePoint Services 2.0, the Roles property was used to get the collection of site groups on the website.
Public property RootFolder Gets the root folder for the website.
Public property ServerRelativeUrl Gets or sets the server-relative URL for the website.
Public property ShowUrlStructureForCurrentUser Retrieves a Boolean value that specifies whether the current user is allowed to see the file structure of the current site. The default value is false.
Public property Site Gets the parent site collection for the website.
Public property SiteAdministrators Gets the collection of the website administrators.
Public property SiteGroups Gets a collection that contains all the groups in the site collection.
Public property SiteLogoDescription Gets or sets the description of the website logo.
Public property SiteLogoUrl Gets or sets the absolute URL of the website logo.
Public property SiteUserInfoList Gets the UserInfo list of the site collection that contains the website.
Public property SiteUsers Gets the collection of all users that belong to the site collection.
Public property SupportedUICultures Gets an enumerable collection of objects with information about cultures supported by the website.
Public property SyndicationEnabled Gets or sets a value that specifies whether Really Simple Syndication (RSS) is enabled in the website.
Public property Theme Gets the name of the theme that is applied to the website.
Public property ThemeCssUrl Gets the URL for the cascading style sheets file that is used in the theme for the website.
Public property ThemedCssFolderUrl Gets or sets the URL to the folder that contains the cascading style sheets (CSS) file that is used in the theme for the website.
Public property Title Gets or sets the title for the website.
Public property TitleResource Gets an SPUserResource object that represents the translations for the title of the website.
Public property TreeViewEnabled Gets or sets a Boolean value that specifies whether the SharePoint Foundation TreeView is enabled in the left navigational area of website pages.
Public property UICulture Gets a CultureInfo object that represents to the default language for the website.
Public property UIVersion Gets or sets the current version number of the user interface.
Public property UIVersionConfigurationEnabled Gets or sets a value that indicates whether to enable the user interface (UI) for changing the version of the UI.
Public property Url Gets the absolute URL for the website.
Public property UserCustomActions Retrieves a refreshed SPUserCustomActionCollection.
Public property UserIsSiteAdmin Gets a Boolean value that indicates whether the user has administrative rights on the website, including ManageSubwebs, ManagePermissions, and ManageWeb permissions.
Public property UserIsWebAdmin Gets a Boolean value that indicates whether the user is a member of the Administrator site group for the site.
Public property UserResources Gets the collection of user-defined localized resources scoped to the current website.
Public property Users Gets the collection of user objects that are explicitly assigned permissions in the website.
Public property ViewStyles Gets the collection of view styles for the website.
Public property Webs Gets a website collection object that represents all websites immediately beneath the website, excluding children of those websites.
Public property WebTemplate Gets the name of the site definition or site template that was used to create the site.
Public property WebTemplateId Gets the identifier (ID) of the site definition that was used to create the site.
Public property WorkflowAssociations Gets the collection of workflow association objects that represents all the workflows that are associated with the website.
Public property Workflows Gets the collection of workflow instances that are running or have run on the website.
Public property WorkflowTemplates Gets the collection of workflow templates of the website.

Top

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 Applies a theme to a website.
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 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 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 GetDocDiscussions Obsolete. Returns the collection of document discussion objects for the specified directory in the site.
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 GetRecycleBinItems Gets the recycle bin items that are based on the specified query.
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.
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 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 and inherits 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 Microsoft.SharePoint.Search.Query.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 Microsoft.SharePoint.Search.Query.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 Microsoft.SharePoint.Search.Query.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 Microsoft.SharePoint.Search.Query.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 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