QueryBasedCollection<T>.Item Property (String)
Retrieves 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 | webRelativeUrl parameter cannot be a null reference (Nothing in Visual Basic) or an empty string. |
ArgumentException | webRelativeUrl is invalid. |
See Also
Reference
QueryBasedCollection<T> Members