FileResult Class¶
Represents an Microsoft.AspNetCore.Mvc.ActionResult that when executed will
write a file as the response.
- Namespace
Microsoft.AspNetCore.Mvc- Assemblies
- Microsoft.AspNetCore.Mvc.Core
Syntax¶
public abstract class FileResult : ActionResult, IActionResult
-
class
Microsoft.AspNetCore.Mvc.FileResult
Constructors¶
-
FileResult(System.String)¶ Creates a new
Microsoft.AspNetCore.Mvc.FileResultinstance with the provided <em>contentType</em>.Arguments: contentType (System.String) – The Content-Type header of the response. protected FileResult(string contentType)
-
Properties¶
-
Microsoft.AspNetCore.Mvc.FileResult.ContentType¶ Gets the Content-Type header for the response.
Return type: System.String public string ContentType { get; }
-
Microsoft.AspNetCore.Mvc.FileResult.FileDownloadName¶ Gets the file name that will be used in the Content-Disposition header of the response.
Return type: System.String public string FileDownloadName { get; set; }
-