Windows Dev Center

HttpContentDispositionHeaderValue class

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

Syntax


var httpContentDispositionHeaderValue = new Windows.Web.Http.Headers.HttpContentDispositionHeaderValue();

Members

The HttpContentDispositionHeaderValue class has these types of members:

Constructors

The HttpContentDispositionHeaderValue class has these constructors.

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

 

Methods

The HttpContentDispositionHeaderValue class has these methods. With C#, Visual Basic, and C++, it also inherits methods from the Object class.

MethodDescription
Parse Converts a string to an HttpContentDispositionHeaderValue instance.
ToString Returns a string that represents the current HttpContentDispositionHeaderValue object.
TryParse Determines whether a string is valid HttpContentDispositionHeaderValue information.

 

Properties

The HttpContentDispositionHeaderValue class has these properties.

PropertyAccess typeDescription

DispositionType

Read/writeGets or sets the value of the disposition-type information in the Content-Disposition HTTP header.

FileName

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

FileNameStar

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

Name

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

Parameters

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

Size

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

 

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:

Requirements (Windows 10 device family)

Device family

Universal

API contract

Windows.Foundation.UniversalApiContract, introduced version 1.0

Namespace

Windows.Web.Http.Headers
Windows::Web::Http::Headers [C++]

Metadata

Windows.Foundation.UniversalApiContract.winmd

Requirements (Windows 8.x and Windows Phone 8.x)

Minimum supported client

Windows 8.1 [Windows Store apps, desktop apps]

Minimum supported server

Windows Server 2012 R2 [Windows Store apps, desktop apps]

Minimum supported phone

Windows Phone 8.1 [Windows Phone Silverlight 8.1 and Windows Runtime apps]

Namespace

Windows.Web.Http.Headers
Windows::Web::Http::Headers [C++]

Metadata

Windows.winmd

Attributes

[DualApiPartition()]
[MarshalingBehavior(Agile)]
[Threading(Both)]
[Version(0x06030000)]

See also

ContentDisposition
HttpContentHeaderCollection
IStringable
Object

 

 

Show:
© 2015 Microsoft