SPAlert.AlertTemplate property

Gets or sets the alert template which defines the content and format of an alert message and, in the case of an e-mail version of the alert, also defines the style and rendering.

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

Syntax

'Declaration
Public Property AlertTemplate As SPAlertTemplate
    Get
    Set
'Usage
Dim instance As SPAlert
Dim value As SPAlertTemplate

value = instance.AlertTemplate

instance.AlertTemplate = value
public SPAlertTemplate AlertTemplate { get; set; }

Property value

Type: Microsoft.SharePoint.SPAlertTemplate
An SPAlertTemplate object that represents the alert template. This property contains a null reference (Nothing in Visual Basic) if the alert is a custom alert without a defined template.

Exceptions

Exception Condition
SPException

The GUID defined in the alert does not correspond to a template in the database.

Remarks

The value of this property cannot be changed after the Update method is called.

See also

Reference

SPAlert class

SPAlert members

Microsoft.SharePoint namespace