HttpWebResponse.ContentType Property


Gets the content type of the response.

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

override ContentType : string with get

Property Value

Type: System.String

A string that contains the content type of the response.

Exception Condition

The current instance has been disposed.

The ContentType property contains the value of the Content-Type header returned with the response.

The following example displays the value of this property.

No code example is currently available or this language may not be supported.

Universal Windows Platform
Available since 8
.NET Framework
Available since 1.1
Portable Class Library
Supported in: portable .NET platforms
Windows Phone Silverlight
Available since 7.0
Windows Phone
Available since 8.1
Return to top