Share via


SPAlert.Item property

Gets or sets the list item or document to which the alert applies.

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

Syntax

'Declaration
Public Property Item As SPListItem
    Get
    Set
'Usage
Dim instance As SPAlert
Dim value As SPListItem

value = instance.Item

instance.Item = value
public SPListItem Item { get; set; }

Property value

Type: Microsoft.SharePoint.SPListItem
An SPListItem object that represents the list item or document.

Remarks

The Item property is required if the AlertType() property contains Item.

This property throws an SPException in the following situations:

  • If set prior to setting the AlertType property.

  • If changed after the Update method is called.

  • If used for an alert that applies to a list or document library.

The Item property contains a null reference (Nothing in Visual Basic) if the AlertType property does not contain Item when the Update method is called.

See also

Reference

SPAlert class

SPAlert members

Microsoft.SharePoint namespace