This topic has not yet been rated - Rate this topic

SPContext.Site property

Gets the site collection that is associated with the current Microsoft SharePoint Foundation request context. Used in conjunction with the static Current property.

Namespace:  Microsoft.SharePoint
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
[ClientCallableConstraintAttribute(Type = ClientCallableConstraintType.NotNull)]
[ClientCallableAttribute(Name = "Site")]
public SPSite Site { get; }

Property value

Type: Microsoft.SharePoint.SPSite
The site collection of the current request context.

Use SPContext.Current.Site to get the site collection of the current request context.

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.