SPWeb.GetListFromUrl method
取得與指定的Web Parts page之第一個網頁組件相關聯的清單。從Windows SharePoint Services 3.0,而不是此方法使用GetListFromWebPartPageUrl方法。
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'宣告
Public Function GetListFromUrl ( _
pageUrl As String _
) As SPList
'用途
Dim instance As SPWeb
Dim pageUrl As String
Dim returnValue As SPList
returnValue = instance.GetListFromUrl(pageUrl)
public SPList GetListFromUrl(
string pageUrl
)
參數
pageUrl
Type: System.StringWeb Parts page,例如/sites/sitecollection/subsite/default.aspx伺服器相對 URL。
傳回值
Type: Microsoft.SharePoint.SPList
指定的頁面上第一個網頁組件相關聯的清單。
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | pageUrl參數是 null 的參考。 |
SPException | URL 不正確,或是指定的Web Parts page之第一個網頁組件不是與清單產生關聯。 |
備註
這個方法會傳回與指定的Web Parts page之第一個網頁組件相關聯的清單。要傳回的Web Parts page本身相關聯的清單,請使用GetList方法。