Alert Object Model
Applies to: SharePoint Foundation 2010
Use the Alerts property of either the SPUser or SPWeb class to return a SPAlertCollection object that represents the collection of alerts for the user or Web site. Use an indexer to return a single alert from the collection.
Note
Call the Update() method after making any changes to the alert.
Alerts Object Model
The following table briefly describes the alert classes, structures, and enumerations. Code examples are located in the appropriate reference topics.
Class, Structure, or Enumeration |
Description |
---|---|
Represents an alert. Provides information about the alert, such as which alert template is used, the alert frequency, and the ID of the user who created the alert. |
|
A collection of SPAlert objects. Iterate through alerts for a Web site or user. Use the Add and Delete methods to programmatically add or delete alerts. |
|
Information about an alert template. |
|
A collection of alert templates. |
|
An enumeration that specifies the time interval for sending an alert. |
|
A structure that provides information about an alert event. |
|
A structure that contains a lightweight SPAlert object. |
|
An enumeration that specifies the status of an alert: Error, On, or Off. |
|
An enumeration that specifies the type of an alert: custom, item, or list. |
|
An enumeration that specifies the means of delivery: e-mail or SMS message. |