Mit FilePathResult für die Rücksendung filestream-UI in mvc

Habe ich eine Action im controller als

public ActionResult Download()    
{ 
    return File(FileStream, "application/octet-stream", fileName); 
}

Wenn ich FilePathresult:

public FilePathResult Download()
{ 
    return File(FileStream, "application/octet-stream", fileName);
}

kann ich rufen Sie die Download() auf klicken Sie auf eine Schaltfläche wie diese

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

Ist auch die Umsetzung von Download() ist korrekt, in der zweiten Instanz, d.h.,in

public FilePathResult Download()

?

Warum nicht Sie versuchen und sehen für sich selbst? Wenn Sie bereits didi, was ist das problem?

InformationsquelleAutor user1400915 | 2012-06-09

Schreibe einen Kommentar