I have a javascript function from which I need to call a controller action to return the filestream to the UI . I am not getting the open,save and save as dialog box. In the cshtml file I have following function:DownloadFile
var selectUrl = '@Url.Action("Download", "Controller")' + "/" + filedetails;
$.post(selectUrl);
and in the controller I have the following code:
public ActionResult Download(string id)
return File(downloadStream, "application/octet-stream",fileName);
Please let me know is this the correct way of calling.