Downloading stream using FileStreamResult

Posted by user1400915 on Programmers See other posts from Programmers or by user1400915
Published on 2012-06-09T14:46:21Z Indexed on 2012/06/09 16:46 UTC
Read the original article Hit count: 156

Filed under:

I have a Action in controller as

public ActionResult Download()

{

return File(downloadStream, "application/octet-stream", fileName);

}

If I want to use FilePathresult as:

public FilePathResult Download()

{

return File(downloadStream, "application/octet-stream", fileName);

}

can I call the Download() on click of a button like this

@Html.ActionLink("FileDownload", "Download", new { file = item.FileName, GuID = item.DocumentGuID }) /text).Width(10);

© Programmers or respective owner

Related posts about asp.net-mvc