Méthodes SPWeb


SPWeb.GetListFromUrl, méthode (Microsoft.SharePoint)
Returns the list that is associated with the first Web Part on the specified Web Part page. Beginning in Windows SharePoint Services 3.0, use the GetListFromWebPartPageUrl method instead of the GetListUrl method.

Espace de noms : Microsoft.SharePoint
Assembly : Microsoft.SharePoint (dans microsoft.sharepoint.dll)
Syntaxe

Visual Basic (Déclaration)
Public Function GetListFromUrl ( _
    pageUrl As String _
) As SPList
Visual Basic (Utilisation)
Dim instance As SPWeb
Dim pageUrl As String
Dim returnValue As SPList

returnValue = instance.GetListFromUrl(pageUrl)
C#
public SPList GetListFromUrl (
    string pageUrl
)

Paramètres

pageUrl

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

Valeur retournée

An SPList object that represents the list.
Notes

The GetListFromUrl 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.

Voir aussi

Page view tracker