Share via


HttpContentDispositionHeaderValue Class

Definition

Represents the value of the Content-Disposition HTTP header on HTTP content in a request or a response.

public ref class HttpContentDispositionHeaderValue sealed : IStringable
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.Headers.IHttpContentDispositionHeaderValueFactory, 65536, Windows.Foundation.UniversalApiContract)]
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class HttpContentDispositionHeaderValue final : IStringable
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
/// [Windows.Foundation.Metadata.Activatable(Windows.Web.Http.Headers.IHttpContentDispositionHeaderValueFactory, 65536, "Windows.Foundation.UniversalApiContract")]
class HttpContentDispositionHeaderValue final : IStringable
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.Headers.IHttpContentDispositionHeaderValueFactory), 65536, typeof(Windows.Foundation.UniversalApiContract))]
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class HttpContentDispositionHeaderValue : IStringable
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
[Windows.Foundation.Metadata.Activatable(typeof(Windows.Web.Http.Headers.IHttpContentDispositionHeaderValueFactory), 65536, "Windows.Foundation.UniversalApiContract")]
public sealed class HttpContentDispositionHeaderValue : IStringable
function HttpContentDispositionHeaderValue(dispositionType)
Public NotInheritable Class HttpContentDispositionHeaderValue
Implements IStringable
Inheritance
Object Platform::Object IInspectable HttpContentDispositionHeaderValue
Attributes
Implements

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Examples

See the code example in HttpContentHeaderCollection class.

Remarks

The HttpContentDispositionHeaderValue class represents information in the Content-Disposition header on HTTP content sent in an HTTP request or received in an HTTP response.

The ContentDisposition property on the HttpContentHeaderCollection returns an HttpContentDispositionHeaderValue.

The Content-Disposition header is normally used for working with file uploads and downloads. The format differs from other headers in that it is a single header with a disposition type followed by a list of parameters, some of which are well defined.

This header is used in two different contexts:

Constructors

HttpContentDispositionHeaderValue(String)

Initializes a new instance of the HttpContentDispositionHeaderValue class with content-coding information for use in the Content-Disposition HTTP header.

Properties

DispositionType

Gets or sets the value of the disposition-type information in the Content-Disposition HTTP header.

FileName

Gets or sets the value of the filename-parm information in the Content-Disposition HTTP header for a single file.

FileNameStar

Gets or sets the value of the filename-parm characteristic in the Content-Disposition HTTP header for multiple files.

Name

Gets or sets the name for a content body part in the Content-Disposition HTTP header.

Parameters

Gets a set of parameters included in the Content-Disposition HTTP header.

Size

Gets or sets the approximate size, in bytes, of the file used in the Content-Disposition HTTP header.

Methods

Parse(String)

Converts a string to an HttpContentDispositionHeaderValue instance.

ToString()

Returns a string that represents the current HttpContentDispositionHeaderValue object.

TryParse(String, HttpContentDispositionHeaderValue)

Determines whether a string is valid HttpContentDispositionHeaderValue information.

Applies to

See also