Controller.Content Controller.Content Controller.Content Method

Definition

Overloads

Content(String) Content(String) Content(String)

Creates a content result object by using a string.

Content(String, String) Content(String, String) Content(String, String)

Creates a content result object by using a string and the content type.

Content(String, String, Encoding) Content(String, String, Encoding) Content(String, String, Encoding)

Creates a content result object by using a string, the content type, and content encoding.

Content(String) Content(String) Content(String)

Creates a content result object by using a string.

protected internal System.Web.Mvc.ContentResult Content (string content);
member this.Content : string -> System.Web.Mvc.ContentResult
Protected Friend Function Content (content As String) As ContentResult
Parameters
content
String String String

The content to write to the response.

Returns

The content result instance.

Content(String, String) Content(String, String) Content(String, String)

Creates a content result object by using a string and the content type.

protected internal System.Web.Mvc.ContentResult Content (string content, string contentType);
member this.Content : string * string -> System.Web.Mvc.ContentResult
Protected Friend Function Content (content As String, contentType As String) As ContentResult
Parameters
content
String String String

The content to write to the response.

contentType
String String String

The content type (MIME type).

Returns

The content result instance.

Content(String, String, Encoding) Content(String, String, Encoding) Content(String, String, Encoding)

Creates a content result object by using a string, the content type, and content encoding.

protected internal virtual System.Web.Mvc.ContentResult Content (string content, string contentType, System.Text.Encoding contentEncoding);
abstract member Content : string * string * System.Text.Encoding -> System.Web.Mvc.ContentResult
override this.Content : string * string * System.Text.Encoding -> System.Web.Mvc.ContentResult
Protected Friend Overridable Function Content (content As String, contentType As String, contentEncoding As Encoding) As ContentResult
Parameters
content
String String String

The content to write to the response.

contentType
String String String

The content type (MIME type).

contentEncoding
Encoding Encoding Encoding

The content encoding.

Returns

The content result instance.

Applies to