Export (0) Print
Expand All

SPUtility.GetSPListFromName method (SPContext, SPWeb, Guid, String, String, String)

Retrieves the specified SharePoint list.

Namespace:  Microsoft.SharePoint.Utilities
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

public static SPList GetSPListFromName(
	SPContext context,
	SPWeb web,
	Guid webId,
	string listGuid,
	string listUrl,
	string listDisplayName
)

Parameters

context
Type: Microsoft.SharePoint.SPContext

An SPContext object that represents the context of the SharePoint Web site to which the list belongs.

web
Type: Microsoft.SharePoint.SPWeb

An SPWeb object that represents the SharePoint Web site to which the list belongs.

webId
Type: System.Guid

The globally unique identifier (GUID) of the SharePoint Web site to which the list belongs.

listGuid
Type: System.String

A string that provides the globally unique identifier (GUID) of the list.

listUrl
Type: System.String

A string that provides the URL of the list.

listDisplayName
Type: System.String

A string that provides the display name of the list.

Return value

Type: Microsoft.SharePoint.SPList
The SharePoint list associated with the provided parameters.

This GetSPListFromName method first attempts to match the list to the specified listGuid, then the listUrl, and finally the listDisplayName.

Show:
© 2014 Microsoft