Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

SPContext.Web property

Gets the Web site 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)

public SPWeb Web { get; }

Property value

Type: Microsoft.SharePoint.SPWeb
The Web site of the current request context.

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

© 2015 Microsoft