ContentResult Class¶
- Namespace
Microsoft.AspNetCore.Mvc- Assemblies
- Microsoft.AspNetCore.Mvc.Core
Syntax¶
public class ContentResult : ActionResult, IActionResult
-
class
Microsoft.AspNetCore.Mvc.ContentResult
Properties¶
-
Microsoft.AspNetCore.Mvc.ContentResult.Content¶ Gets or set the content representing the body of the response.
Return type: System.String public string Content { get; set; }
-
Microsoft.AspNetCore.Mvc.ContentResult.ContentType¶ Gets or sets the Content-Type header for the response.
Return type: System.String public string ContentType { get; set; }
-
Microsoft.AspNetCore.Mvc.ContentResult.StatusCode¶ Gets or sets the HTTP status code.
Return type: System.Nullable<System.Int32> public int ? StatusCode { get; set; }
-