HttpListenerResponse.ContentType Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets or sets the MIME type of the content returned.
public:
property System::String ^ ContentType { System::String ^ get(); void set(System::String ^ value); };
public string? ContentType { get; set; }
public string ContentType { get; set; }
member this.ContentType : string with get, set
Public Property ContentType As String
Property Value
A String instance that contains the text of the response's Content-Type
header.
Exceptions
The value specified for a set operation is null
.
The value specified for a set operation is an empty string ("").
This object is closed.
Remarks
When communicating with a Web browser, you should explicitly set this property when returning any content type other than text/html
.
For a complete list of response headers, see the HttpResponseHeader enumeration.
Applies to
See also
.NET
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示