Export (0) Print
Expand All

ContentDispositionHeaderValue Class

.NET Framework 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 methodSupported in .NET for Windows Store appsContentDispositionHeaderValue(ContentDispositionHeaderValue)Initializes a new instance of the ContentDispositionHeaderValue class.
Public methodSupported in .NET for Windows Store appsContentDispositionHeaderValue(String)Initializes a new instance of the ContentDispositionHeaderValue class.
Top

  NameDescription
Public propertySupported in .NET for Windows Store appsCreationDateThe date at which the file was created.
Public propertySupported in .NET for Windows Store appsDispositionTypeThe disposition type for a content body part.
Public propertySupported in .NET for Windows Store appsFileNameA 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 propertySupported in .NET for Windows Store appsFileNameStarA 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 propertySupported in .NET for Windows Store appsModificationDateThe date at which the file was last modified.
Public propertySupported in .NET for Windows Store appsNameThe name for a content body part.
Public propertySupported in .NET for Windows Store appsParametersA set of parameters included the Content-Disposition header.
Public propertySupported in .NET for Windows Store appsReadDateThe date the file was last read.
Public propertySupported in .NET for Windows Store appsSizeThe approximate size, in bytes, of the file.
Top

  NameDescription
Public methodSupported in .NET for Windows Store appsEqualsDetermines whether the specified Object is equal to the current ContentDispositionHeaderValue object. (Overrides Object.Equals(Object).)
Protected methodSupported in .NET for Windows Store appsFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.)
Public methodSupported in .NET for Windows Store appsGetHashCodeServes as a hash function for an ContentDispositionHeaderValue object. (Overrides Object.GetHashCode().)
Public methodSupported in .NET for Windows Store appsGetTypeGets the Type of the current instance. (Inherited from Object.)
Protected methodSupported in .NET for Windows Store appsMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic memberSupported in .NET for Windows Store appsParseConverts a string to an ContentDispositionHeaderValue instance.
Public methodSupported in .NET for Windows Store appsToStringReturns a string that represents the current ContentDispositionHeaderValue object. (Overrides Object.ToString().)
Public methodStatic memberSupported in .NET for Windows Store appsTryParseDetermines 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 Store apps

Supported in: Windows 8

Supported in: Windows Phone 8.1

Windows Phone 8.1, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

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:
© 2014 Microsoft