FilePathResult(String, String) Constructor

Definition

Initializes a new instance of the FilePathResult class by using the specified file name and content type.

public FilePathResult (string fileName, string contentType);
new System.Web.Mvc.FilePathResult : string * string -> System.Web.Mvc.FilePathResult
Public Sub New (fileName As String, contentType As String)

Parameters

fileName
String

The name of the file to send to the response.

contentType
String

The content type of the response.

Exceptions

The fileName parameter is null or empty.

Applies to