ControllerBase.Content Methode
Definition
Wichtig
Einige Informationen beziehen sich auf Vorabversionen, die vor dem Release ggf. grundlegend überarbeitet werden. Microsoft übernimmt hinsichtlich der hier bereitgestellten Informationen keine Gewährleistungen, seien sie ausdrücklich oder konkludent.
Überlädt
| Content(String) |
Erstellt ein ContentResult -Objekt, indem eine |
| Content(String, MediaTypeHeaderValue) |
Erstellt ein ContentResult -Objekt, indem eine |
| Content(String, String) |
Erstellt ein ContentResult -Objekt, indem eine |
| Content(String, String, Encoding) |
Erstellt ein ContentResult -Objekt, indem eine |
Content(String)
- Quelle:
- ControllerBase.cs
- Quelle:
- ControllerBase.cs
- Quelle:
- ControllerBase.cs
Erstellt ein ContentResult -Objekt, indem eine content 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
Das erstellte ContentResult Objekt für die Antwort.
- Attribute
Gilt für:
Content(String, MediaTypeHeaderValue)
- Quelle:
- ControllerBase.cs
- Quelle:
- ControllerBase.cs
- Quelle:
- ControllerBase.cs
Erstellt ein ContentResult -Objekt, indem eine content Zeichenfolge und eine contentTypeangegeben werden.
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
Das erstellte ContentResult Objekt für die Antwort.
- Attribute
Gilt für:
Content(String, String)
- Quelle:
- ControllerBase.cs
- Quelle:
- ControllerBase.cs
- Quelle:
- ControllerBase.cs
Erstellt ein ContentResult -Objekt, indem eine content Zeichenfolge und ein 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
Das erstellte ContentResult Objekt für die Antwort.
- Attribute
Gilt für:
Content(String, String, Encoding)
- Quelle:
- ControllerBase.cs
- Quelle:
- ControllerBase.cs
- Quelle:
- ControllerBase.cs
Erstellt ein ContentResult -Objekt, indem eine content Zeichenfolge, eine und contentEncodingangegeben contentTypewerden.
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
Das erstellte ContentResult Objekt für die Antwort.
- Attribute
Hinweise
Wenn die Codierung sowohl vom Zeichensatz als auch von den contentEncoding Parametern bereitgestellt wird, wird der contentEncoding Parameter als endgültige Codierung ausgewählt.