ContentType Property
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
Gets or sets the MIME type of the content returned.
Namespace: System.Net
Assembly: System.Http (in System.Http.dll)
Syntax
'Declaration
Public Property ContentType As String
public string ContentType { get; set; }
public:
property String^ ContentType {
String^ get ();
void set (String^ value);
}
member ContentType : string with get, set
function get ContentType () : String
function set ContentType (value : String)
Property Value
Type: System. . :: . .String
A String instance that contains the text of the response's Content-Type header.
Remarks
When communicating with a Web browser, you should explicitly set this property when returning any content type other than text/html.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see dd66cd4c-b087-415f-9c3e-94e3a1835f74.