Share via


FileContentResult Class

Definition

Sends the contents of a binary file to the response.

public class FileContentResult : System.Web.Mvc.FileResult
type FileContentResult = class
    inherit FileResult
Public Class FileContentResult
Inherits FileResult
Inheritance
FileContentResult

Constructors

FileContentResult(Byte[], String)

Initializes a new instance of the FileContentResult class by using the specified file contents and content type.

Properties

ContentType

Gets the content type to use for the response.

(Inherited from FileResult)
FileContents

The binary content to send to the response.

FileDownloadName

Gets or sets the content-disposition header so that a file-download dialog box is displayed in the browser with the specified file name.

(Inherited from FileResult)

Methods

ExecuteResult(ControllerContext)

Enables processing of the result of an action method by a custom type that inherits from the ActionResult class.

(Inherited from FileResult)
WriteFile(HttpResponseBase)

Writes the file content to the response.

Applies to