This documentation is archived and is not being maintained.

SPWeb.GetListFromWebPartPageUrl Method

Windows SharePoint Services 3

Returns the list that is associated with the first Web Part on the specified Web Part page.

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

public SPList GetListFromWebPartPageUrl(
	string pageUrl
)

Parameters

pageUrl
Type: System.String
A string that contains the site-relative URL of a Web Part page, for example, /Lists/Announcements/AllItems.aspx.

Return Value

Type: Microsoft.SharePoint.SPList
An SPList object that represents the list.

The GetListFromWebPartPageUrl method does not return the list that is associated with the specified Web Part page. To return the list that is associated with a specified URL, use the GetList method.

Show: