PackWebRequest::ContentType Property

 
System_CAPS_noteNote

The .NET API Reference documentation has a new home. Visit the .NET API Browser on docs.microsoft.com to see the new experience.

Gets or sets the Content-type HTTP header.

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

public:
property String^ ContentType {
	virtual String^ get() override;
	virtual void set(String^ value) override;
}

Property Value

Type: System::String^

The contents of the header.

Note that the pack URI protocol does not process information in the request other than the uniform resource identifier (URI). For most purposes (such as determining the type of POST information), there is no use for this property.

ContentType returns an empty string if the request resolves from the PackageStore cache.

The ContentType property is shared with the inner WebRequest (GetInnerRequest).

.NET Framework
Available since 3.0
Return to top
Show: