Export (0) Print
Expand All

PackWebResponse.ContentType Property

Gets the Multipurpose Internet Mail Extensions (MIME) content type of the response stream's content. 

Namespace:  System.IO.Packaging
Assembly:  PresentationCore (in PresentationCore.dll)

abstract ContentType : string with get 
override ContentType : string with get

Property Value

Type: System.String
The MIME type of the stream's content.

If a request does not specify a part in the package, it returns the MIME type of the package.

Requests that specify a part in the package return one of the following:

  1. If the requested part contains a ContentType value, the ContentType value is returned.

  2. If the requested part contains no ContentType value but the stream name contains a recognized MIME extension type, the MIME type corresponding to the extension is returned.

  3. If the requested part does not contain a ContentType value nor a recognized MIME extension type, ContentType returns an empty string.

.NET Framework

Supported in: 4.6, 4.5, 4, 3.5, 3.0

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft