SPContext Members

Include Protected Members
Include Inherited Members

Represents the context of an HTTP request in Windows SharePoint Services.

The SPContext type exposes the following members.

Properties

  Name Description
Public propertyStatic member Current Gets the context of the current HTTP request in Windows SharePoint Services.
Public property FieldControlCacheGetCallback Gets or sets the delegate to call to check for a cached value in the current Windows SharePoint Services HTTP context.
Public property FieldControlCacheSetCallback Gets or sets the delegate to call when setting the cached data in the current Windows SharePoint Services HTTP context.
Public property Fields Gets the fields metadata associated with the item or content type of the Windows SharePoint Services context.
Public property File Gets the file that is associated with the list item object of the given Windows SharePoint Services context.
Public property FileLevel Gets the representation of the version of the file or ASP.Net page.
Public property FormContext Gets the form context object for the form-specific Windows SharePoint Services context.
Public property HasDesignTimeContentType A Boolean value that indicates whether the object contains design-time content type objects.
Public property IsDesignTime Gets a Boolean value specifying whether the Web request is operating in a design-time configuration.
Public property IsRemoteAuthoringTime Gets a value that represents whether the current request renders for design time.
Public property Item Gets either the SPListItem object that is determined by the given list and item ID, or the SPItem object that is set when the SPContext object is created.
Public property ItemId Gets the ID of the item that is associated with the Windows SharePoint Services context.
Public property List Gets the list that is associated with the Windows SharePoint Services context.
Public property ListId Gets the GUID of the list that is associated with the Windows SharePoint Services context.
Public property ListItem Gets the list item associated with the Windows SharePoint Services context.
Public property ListItemDisplayName Gets or sets the display name for the item that is associated with the current HTTP context ofWindows SharePoint Services.
Public property ListItemServerRelativeUrl Gets or sets the server-relative URL for the list item in the current HTTP context of Windows SharePoint Services.
Public property ListItemVersion Gets a UInt32 object that represents version number specified by the context.
Public property LoadContentTypes Gets or sets a Boolean value that specifies whether to include content type fields when implementing the Fields property in order to return the fields associated with an item.
Public property MobileContext Gets the mobile context for the Windows SharePoint Services context.
Public property RecurrenceID Returns the instance ID or exception ID of the Windows SharePoint Services context, or returns a null reference (Nothing in Visual Basic) if the current context is not associated with an event list item.
Public property RegionalSettings Gets the regional settings object of the current HTTP context inWindows SharePoint Services.
Public property Site Gets the site collection that is associated with the Windows SharePoint Services context.
Public property SiteFeatures Gets the activated site collection features of the Windows SharePoint Services context.
Public property UseDefaultCachePolicy Gets or sets a Boolean value that determines whether Windows SharePoint Services sets the HTTP cache headers on the response for an item fetched from Windows SharePoint Services.
Public property ViewContext Gets a view context object that provides information about the current view.
Public property Web Gets the Web site that is associated with the Windows SharePoint Services context.
Public property WebFeatures Gets the activated site features of the Windows SharePoint Services context.

Top

Methods

  Name Description
Public method Equals (Inherited from Object.)
Protected method Finalize (Inherited from Object.)
Public methodStatic member GetContext(HttpContext) Returns the Windows SharePoint Services context for the specified HTTP context.
Public methodStatic member GetContext(SPWeb) Returns the Windows SharePoint Services context for the specified SharePoint Web site.
Public methodStatic member GetContext(HttpContext, SPItem, SPWeb) Returns the Windows SharePoint Services context for an item that is not list-based using the specified HTTP context, item, and site.
Public methodStatic member GetContext(HttpContext, Int32, Type) Returns the Windows SharePoint Services context for an item that is not list-based using the specified HTTP context, item ID, and item type.
Public methodStatic member GetContext(HttpContext, Guid, Guid, SPWeb) Returns the Windows SharePoint Services context for an item that is not list-based using the specified HTTP context, view ID, list ID, and Web site.
Public methodStatic member GetContext(HttpContext, Int32, Guid, SPWeb) Returns the Windows SharePoint Services context for an item that is not list-based using the specified HTTP context, item ID, list ID, and Web site.
Public method GetHashCode (Inherited from Object.)
Public method GetType (Inherited from Object.)
Protected method MemberwiseClone (Inherited from Object.)
Public method ResetItem Forces a re-fetch of SPItem data cached by the SPContext object.
Public method ToString (Inherited from Object.)

Top

See Also

Reference

SPContext Class

Microsoft.SharePoint Namespace