Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
ContentType Property

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)

public override string ContentType { get; }
/** @property */
public String get_ContentType ()

public override function get ContentType () : String

You cannot use this property in XAML.

Property Value

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.

Windows 98, Windows Server 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.

.NET Framework

Supported in: 3.0

Community Additions

ADD
Show:
© 2015 Microsoft