0 out of 1 rated this helpful - Rate this topic

EmailCalendarMessage Class

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class EmailCalendarMessage : FormComponent
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
EmailCalendarMessage
Description

The Microsoft.SharePoint.WebControls.EmailCalendarMessage class inherits from the Microsoft.SharePoint.WebControls.FormComponent class which is the foundational control for form and field rendering controls. EmailCalendarMessage provides output of the text "Attendees will not be notified of any updates made to this meeting". 

EmailCalendarMessage is meant as a simple display mechanism in order to inform a user that by default attendees do not automatically receive updates when an event in a SharePoint calendar changes. The control itself simply uses SPResource.GetString in order to get the message, using SPHttpUtility.HtmlEncode to encode the output. 

The Usage Scenario

The primary usage of EmailCalendarMessage is informing users that when a SharePoint calendar changes they will not receive updates by default. When programmatically using SharePoint calendars, users can receive this be notified by using EmailCalendarMessage as a common WebControl.

In the below, a new EmailCalendarMessage object is created and the EmailCalendarMessage.ID and EmailCalendarMessage.Visible properties are set. Following, the control is added to the current instance control collection.

C# Code Example

protected override void CreateChildControls()
{
EmailCalendarMessage message = new EmailCalendarMessage();
message.ID = "Calendar";
message.Visible = true;
Controls.Add(message);
}

Visual Basic .NET Code Example

Protected Overloads Overrides Sub CreateChildControls()
Dim message As New EmailCalendarMessage()
message.ID = "Calendar"
message.Visible = True
Controls.Add(message)
End Sub

Adam Buenz
SharePoint Foundation MVP - http://www.sharepointsecurity.com