Class ContentResult
Represents a user-defined content type that is the result of an action method.
public class ContentResult : ActionResult
- Inheritance
-
ContentResult
- Inherited Members
Constructors
ContentResult()
Initializes a new instance of the ContentResult class.
public ContentResult()
Properties
Content
Gets or sets the content.
public string Content { get; set; }
Property Value
- string
The content.
ContentEncoding
Gets or sets the content encoding.
public Encoding ContentEncoding { get; set; }
Property Value
- Encoding
The content encoding.
ContentType
Gets or sets the type of the content.
public string ContentType { get; set; }
Property Value
- string
The type of the content.
Methods
ExecuteResult(ControllerContext)
Enables processing of the result of an action method by a custom type that inherits from the ActionResult class.
public override void ExecuteResult(ControllerContext context)
Parameters
context
ControllerContextThe context within which the result is executed.
Exceptions
- ArgumentNullException
The
context
parameter is null.