SPMobileMessageContentPart Constructor (String, String, String)
Initializes a new instance of the SPMobileMessageContentPart class that has the specified MIME type, ID, and location.
Namespace: Microsoft.SharePoint.MobileMessage
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
Public Sub New ( _
mimeType As String, _
id As String, _
location As String _
)
'Usage
Dim mimeType As String
Dim id As String
Dim location As String
Dim instance As New SPMobileMessageContentPart(mimeType, _
id, location)
public SPMobileMessageContentPart(
string mimeType,
string id,
string location
)
Parameters
mimeType
Type: System.StringThe MIME type of the content, such as “text/plain”.
id
Type: System.StringThe ID of the content part. See Remarks for its structure.
location
Type: System.StringThe filename of the content, not including the file extension. This parameter is not used in SharePoint Foundation, but it cannot be an empty string or a null reference (Nothing in Visual Basic). Pass any string.
Exceptions
Exception | Condition |
---|---|
ArgumentException | One of the parameters is empty or a null reference (Nothing in Visual Basic). |
Remarks
In SharePoint Foundation, mimeType must be “text/plain”.
id has the following structure:
Attserial_number[.file_extension]@ GUID_with_no_spaces_or_punctuation
The file extension is optional. serial_number is zero for the first content part in a given message. Each subsequent content part added gets a serial number that is one greater than its predecessor. The following is an example content part ID:
Att2.txt@f024b9c54a0742bc909f6bf5beff106c
See Also
Reference
SPMobileMessageContentPart Class
SPMobileMessageContentPart Members