ContentResult Class

Syntax

public class ContentResult : ActionResult, IActionResult

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.ContentResult

Properties

Content()

Gets or set the content representing the body of the response.

Return type:System.String
public string Content { get; set; }
ContentType()

Gets or sets the @!:MediaTypeHeaderValue- representing the Content-Type header of the response.

Return type:MediaTypeHeaderValue
public MediaTypeHeaderValue ContentType { get; set; }
StatusCode()

Gets or sets the HTTP status code.

Return type:System.Nullable{System.Int32}
public int ? StatusCode { get; set; }

Methods

ExecuteResultAsync(Microsoft.AspNet.Mvc.ActionContext)
Arguments:
Return type:

System.Threading.Tasks.Task

public override Task ExecuteResultAsync(ActionContext context)