Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
FileContentResult Constructor
Collapse the table of content
Expand the table of content

FileContentResult Constructor (Byte[], String)

 

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

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

public FileContentResult(
	byte[] fileContents,
	string contentType
)

Parameters

fileContents
Type: System.Byte[]

The byte array to send to the response.

contentType
Type: System.String

The content type to use for the response.

Exception Condition
ArgumentNullException

The fileContents parameter is null.

Return to top
Show:
© 2015 Microsoft