ControllerBase.Content Yöntem
Tanım
Önemli
Bazı bilgiler ürünün ön sürümüyle ilgilidir ve sürüm öncesinde önemli değişiklikler yapılmış olabilir. Burada verilen bilgilerle ilgili olarak Microsoft açık veya zımni hiçbir garanti vermez.
Aşırı Yüklemeler
| Content(String) |
ContentResultBir dize belirterek bir nesne oluşturur |
| Content(String, MediaTypeHeaderValue) |
Bir ContentResult |
| Content(String, String) |
Bir ContentResult |
| Content(String, String, Encoding) |
Bir ContentResult |
Content(String)
ContentResultBir dize belirterek bir nesne oluşturur content .
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
Parametreler
- content
- String
Yanıta yazılacak içerik.
Döndürülenler
ContentResultYanıt için oluşturulan nesne.
- Öznitelikler
Şunlara uygulanır
Content(String, MediaTypeHeaderValue)
Bir ContentResult content dize ve bir belirterek nesnesi oluşturur contentType .
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
Parametreler
- content
- String
Yanıta yazılacak içerik.
- contentType
- MediaTypeHeaderValue
İçerik türü (MIME türü).
Döndürülenler
ContentResultYanıt için oluşturulan nesne.
- Öznitelikler
Şunlara uygulanır
Content(String, String)
Bir ContentResult content dize ve içerik türü belirterek bir nesne oluşturur.
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
Parametreler
- content
- String
Yanıta yazılacak içerik.
- contentType
- String
İçerik türü (MIME türü).
Döndürülenler
ContentResultYanıt için oluşturulan nesne.
- Öznitelikler
Şunlara uygulanır
Content(String, String, Encoding)
Bir ContentResult content dize,, ve belirterek bir nesne oluşturur contentType contentEncoding .
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
Parametreler
- content
- String
Yanıta yazılacak içerik.
- contentType
- String
İçerik türü (MIME türü).
- contentEncoding
- Encoding
İçerik kodlaması.
Döndürülenler
ContentResultYanıt için oluşturulan nesne.
- Öznitelikler
Açıklamalar
Kodlama hem ' CharSet ' hem de contentEncoding parametreleriyle sağlanmışsa, contentEncoding parametre son kodlama olarak seçilir.