Table of contents
TOC
Collapse the table of content
Expand the table of content

ListExtensions.GetListByUrl Method

SharePoint Dev Documents|Last Updated: 6/19/2017
|
1 Contributor

Get list by using Url

Namespace:Microsoft.SharePoint.Client
Assembly: OfficeDevPnP.Core.dll

Syntax

public static List GetListByUrl(this Web web, String webRelativeUrl, params Expression<Func<List, Object>>[] expressions)

Parameters

web

  Type: Microsoft.SharePoint.Client.Web
  Web (site) to be processed

webRelativeUrl

  Type: System.String
  Url of list relative to the web (site), e.g. lists/testlist

expressions

  Type: System.Linq.Expressions.Expression<System.Func<Microsoft.SharePoint.Client.List, System.Object>>[]
  Additional list of lambda expressions of properties to load alike l => l.BaseType

Return Value

Type: List
Returns list if found, null if no list is found.

See also

© 2018 Microsoft