AlternateView.CreateAlternateViewFromString

CreateAlternateViewFromString(string)

Creates a plain-text view from a string.

public static AlternateView CreateAlternateViewFromString(string content)
ParameterTypeDescription
contentStringThe content of the view.

Return Value

The new alternate view.

See Also


CreateAlternateViewFromString(string, Encoding, string)

Creates a view from a string with the specified encoding and media type.

public static AlternateView CreateAlternateViewFromString(string content, Encoding contentEncoding, 
    string mediaType)
ParameterTypeDescription
contentStringThe content of the view.
contentEncodingEncodingThe character encoding of the content.
mediaTypeStringThe MIME media type of the content, such as text/html.

Return Value

The new alternate view.

See Also


CreateAlternateViewFromString(string, ContentType)

Creates a view from a string with the specified content type.

public static AlternateView CreateAlternateViewFromString(string content, ContentType contentType)
ParameterTypeDescription
contentStringThe content of the view.
contentTypeContentTypeThe content type of the view, with its media type and character set.

Return Value

The new alternate view.

See Also


CreateAlternateViewFromString(string, ContentType, TransferEncoding)

Creates a view from a string with the specified content type and transfer encoding.

public static AlternateView CreateAlternateViewFromString(string content, ContentType contentType, 
    TransferEncoding transferencoding)
ParameterTypeDescription
contentStringThe content of the view.
contentTypeContentTypeThe content type of the view, with its media type and character set.
transferencodingTransferEncodingThe transfer encoding of the content, such as Base64 or quoted-printable.

Return Value

The new alternate view.

See Also