SPWeb.GetListFromUrl 方法

Gets the list that is associated with the first Web Part on the specified Web 部件页. Beginning in Windows SharePoint Services 3.0, use the GetListFromWebPartPageUrl method instead of this method.

命名空间:  Microsoft.SharePoint
程序集:  Microsoft.SharePoint(位于 Microsoft.SharePoint.dll 中)

语法

声明
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
    类型:System.String

    The server-relative URL of a Web 部件页, such as /sites/sitecollection/subsite/default.aspx.

返回值

类型:Microsoft.SharePoint.SPList
The list that is associated with the first Web Part on the specified page.

异常

异常 条件
ArgumentNullException

The pageUrl parameter is null reference.

SPException

Either the URL is invalid, or the first Web Part on the specified Web 部件页 is not associated with lists.

备注

This method returns the list that is associated with the first Web Part on the specified Web 部件页. To return the list that is associated with the Web 部件页 itself, use the GetList method.

另请参阅

引用

SPWeb 类

SPWeb 成员

Microsoft.SharePoint 命名空间