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

ContentDispositionHeaderValue Class

.NET Framework 4.6 and 4.5

Represents the value of the Content-Disposition header.

System.Object
  System.Net.Http.Headers.ContentDispositionHeaderValue

Namespace:  System.Net.Http.Headers
Assembly:  System.Net.Http (in System.Net.Http.dll)

public class ContentDispositionHeaderValue : ICloneable

The ContentDispositionHeaderValue type exposes the following members.

  NameDescription
Protected methodContentDispositionHeaderValue(ContentDispositionHeaderValue)Initializes a new instance of the ContentDispositionHeaderValue class.
Public methodContentDispositionHeaderValue(String)Initializes a new instance of the ContentDispositionHeaderValue class.
Top

  NameDescription
Public propertyCreationDateThe date at which the file was created.
Public propertyDispositionTypeThe disposition type for a content body part.
Public propertyFileNameA suggestion for how to construct a filename for storing the message payload to be used if the entity is detached and stored in a separate file.
Public propertyFileNameStarA suggestion for how to construct filenames for storing message payloads to be used if the entities are detached and stored in a separate files.
Public propertyModificationDateThe date at which the file was last modified.
Public propertyNameThe name for a content body part.
Public propertyParametersA set of parameters included the Content-Disposition header.
Public propertyReadDateThe date the file was last read.
Public propertySizeThe approximate size, in bytes, of the file.
Top

  NameDescription
Public methodEqualsDetermines whether the specified Object is equal to the current ContentDispositionHeaderValue object. (Overrides Object.Equals(Object).)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodGetHashCodeServes as a hash function for an ContentDispositionHeaderValue object. (Overrides Object.GetHashCode().)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic memberParseConverts a string to an ContentDispositionHeaderValue instance.
Public methodToStringReturns a string that represents the current ContentDispositionHeaderValue object. (Overrides Object.ToString().)
Public methodStatic memberTryParseDetermines whether a string is valid ContentDispositionHeaderValue information.
Top

  NameDescription
Explicit interface implemetationPrivate methodICloneable.CloneCreates a new object that is a copy of the current ContentDispositionHeaderValue instance.
Top

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:

  1. A MIME header for nested body content in the MultipartFormDataContent class. For more information, see IETF RFC 2183.

  2. An HTTP header in HttpContentHeaders class. For more information, see IETF RFC 6266.

.NET Framework

Supported in: 4.6, 4.5

.NET for Windows Phone apps

Supported in: Windows Phone 8.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Show:
© 2015 Microsoft