SPUtility.GetLayoutsFolder method (SPWeb)
Returns a versioned layouts folder for the specified site.
Namespace: Microsoft.SharePoint.Utilities
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Shared Function GetLayoutsFolder ( _
web As SPWeb _
) As String
'Usage
Dim web As SPWeb
Dim returnValue As String
returnValue = SPUtility.GetLayoutsFolder(web)
public static string GetLayoutsFolder(
SPWeb web
)
Parameters
web
Type: Microsoft.SharePoint.SPWebThe web used to obtain the versioned layouts folder.
Return value
Type: System.String
The name of the versioned layouts folder for the specified site.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The web parameter is a null reference (Nothing in Visual Basic). |
Remarks
If site.CompatibilityLevel is greater than or equal to 15, GetLayoutsFolder(SPWeb) returns "_layouts/site.CompatibilityLevel". Otherwise, the method returns "_layouts".