ControllerBase.Content Methode

Definition

Überlädt

Content(String)

Erstellt ein Objekt, indem eine ContentResultcontent Zeichenfolge angegeben wird.

Content(String, MediaTypeHeaderValue)

Erstellt ein Objekt, indem eine ContentResult Zeichenfolge und eine contentTypecontent Zeichenfolge angegeben wird.

Content(String, String)

Erstellt ein Objekt, indem eine ContentResult Zeichenfolge und ein content Inhaltstyp angegeben werden.

Content(String, String, Encoding)

Erstellt ein Objekt, indem eine Zeichenfolge, contentTypeeine ContentResult und contentEncodingeine content angegeben wird.

Content(String)

Erstellt ein Objekt, indem eine ContentResultcontent Zeichenfolge angegeben wird.

public:
 virtual Microsoft::AspNetCore::Mvc::ContentResult ^ Content(System::String ^ content);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ContentResult Content (string content);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Content : string -> Microsoft.AspNetCore.Mvc.ContentResult
override this.Content : string -> Microsoft.AspNetCore.Mvc.ContentResult
Public Overridable Function Content (content As String) As ContentResult

Parameter

content
String

Der Inhalt, der in die Antwort geschrieben werden soll.

Gibt zurück

ContentResult

Das erstellte ContentResult Objekt für die Antwort.

Attribute

Gilt für

Content(String, MediaTypeHeaderValue)

Erstellt ein Objekt, indem eine ContentResult Zeichenfolge und eine contentTypecontent Zeichenfolge angegeben wird.

public:
 virtual Microsoft::AspNetCore::Mvc::ContentResult ^ Content(System::String ^ content, Microsoft::Net::Http::Headers::MediaTypeHeaderValue ^ contentType);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ContentResult Content (string content, Microsoft.Net.Http.Headers.MediaTypeHeaderValue contentType);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ContentResult Content (string content, Microsoft.Net.Http.Headers.MediaTypeHeaderValue? contentType);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Content : string * Microsoft.Net.Http.Headers.MediaTypeHeaderValue -> Microsoft.AspNetCore.Mvc.ContentResult
override this.Content : string * Microsoft.Net.Http.Headers.MediaTypeHeaderValue -> Microsoft.AspNetCore.Mvc.ContentResult
Public Overridable Function Content (content As String, contentType As MediaTypeHeaderValue) As ContentResult

Parameter

content
String

Der Inhalt, der in die Antwort geschrieben werden soll.

contentType
MediaTypeHeaderValue

Der Inhaltstyp (MIME-Typ).

Gibt zurück

ContentResult

Das erstellte ContentResult Objekt für die Antwort.

Attribute

Gilt für

Content(String, String)

Erstellt ein Objekt, indem eine ContentResult Zeichenfolge und ein content Inhaltstyp angegeben werden.

public:
 virtual Microsoft::AspNetCore::Mvc::ContentResult ^ Content(System::String ^ content, System::String ^ contentType);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ContentResult Content (string content, string contentType);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Content : string * string -> Microsoft.AspNetCore.Mvc.ContentResult
override this.Content : string * string -> Microsoft.AspNetCore.Mvc.ContentResult
Public Overridable Function Content (content As String, contentType As String) As ContentResult

Parameter

content
String

Der Inhalt, der in die Antwort geschrieben werden soll.

contentType
String

Der Inhaltstyp (MIME-Typ).

Gibt zurück

ContentResult

Das erstellte ContentResult Objekt für die Antwort.

Attribute

Gilt für

Content(String, String, Encoding)

Erstellt ein Objekt, indem eine Zeichenfolge, contentTypeeine ContentResult und contentEncodingeine content angegeben wird.

public:
 virtual Microsoft::AspNetCore::Mvc::ContentResult ^ Content(System::String ^ content, System::String ^ contentType, System::Text::Encoding ^ contentEncoding);
[Microsoft.AspNetCore.Mvc.NonAction]
public virtual Microsoft.AspNetCore.Mvc.ContentResult Content (string content, string contentType, System.Text.Encoding contentEncoding);
[<Microsoft.AspNetCore.Mvc.NonAction>]
abstract member Content : string * string * System.Text.Encoding -> Microsoft.AspNetCore.Mvc.ContentResult
override this.Content : string * string * System.Text.Encoding -> Microsoft.AspNetCore.Mvc.ContentResult
Public Overridable Function Content (content As String, contentType As String, contentEncoding As Encoding) As ContentResult

Parameter

content
String

Der Inhalt, der in die Antwort geschrieben werden soll.

contentType
String

Der Inhaltstyp (MIME-Typ).

contentEncoding
Encoding

Die Inhaltscodierung.

Gibt zurück

ContentResult

Das erstellte ContentResult Objekt für die Antwort.

Attribute

Hinweise

Wenn die Codierung sowohl vom "Charset" als contentEncoding auch den Parametern bereitgestellt wird, wird der contentEncoding Parameter als endgültige Codierung ausgewählt.

Gilt für