QueryBasedCollection<T>.Item property (String)

Gets an item by its Web-relative URL.

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

Syntax

'Declaration
Public ReadOnly Default Property Item ( _
    webRelativeUrl As String _
) As T
    Get
'Usage
Dim instance As QueryBasedCollection
Dim webRelativeUrl As String
Dim value As T

value = instance(webRelativeUrl)
public T this[
    string webRelativeUrl
] { get; }

Parameters

  • webRelativeUrl
    Type: System.String

    String that indicates the Web-relative URL of the item.

Property value

Type: T
The item located by the Web-relative URL, or a null reference (Nothing in Visual Basic) if the value cannot be found.

Exceptions

Exception Condition
ArgumentException

The webRelativeUrl parameter cannot be a null reference (Nothing in Visual Basic) or an empty string.

ArgumentException

The webRelativeUrl is not valid.

See also

Reference

QueryBasedCollection<T> class

QueryBasedCollection<T> members

Item overload

Microsoft.SharePoint.Publishing namespace

Item

Item