Share via


FilePathResult Constructor

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

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

Syntax

'Declaration
Public Sub New ( _
    fileName As String, _
    contentType As String _
)
public FilePathResult(
    string fileName,
    string contentType
)
public:
FilePathResult(
    String^ fileName, 
    String^ contentType
)

Parameters

  • fileName
    Type: System.String
    The name of the file to send to the response.
  • contentType
    Type: System.String
    The content type of the response.

Exceptions

Exception Condition
ArgumentException

The fileName parameter is null reference (Nothing in Visual Basic) or empty.

See Also

Reference

FilePathResult Class

System.Web.Mvc Namespace