This is my first question on stackOverflow. After many research i don't find a way to download a file when the user go on the right URL.
With .Net Framework is used the following code :
System.Web.HttpResponse response = System.Web.HttpContext.Current.Response;
response.ClearContent();
response.Clear();
response.ContentType = "text/plain";
response.AddHeader("Content-Disposition",
"attachment; filename=" + fileName + ";");
response.TransmitFile(Server.MapPath("FileDownload.csv"));
response.Flush();
response.End();
What is the equivalent with .Net core ? Thanks