FileContentResult FileContentResult FileContentResult Class


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


FileContentResult(Byte[], String) FileContentResult(Byte[], String) FileContentResult(Byte[], String)

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


ContentType ContentType ContentType

Gets the content type to use for the response.

(Inherited from FileResult)
FileContents FileContents FileContents

The binary content to send to the response.

FileDownloadName FileDownloadName 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)


ExecuteResult(ControllerContext) ExecuteResult(ControllerContext) 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) WriteFile(HttpResponseBase) WriteFile(HttpResponseBase)

Writes the file content to the response.

Applies to