James Zhous blog

public ActionResult Download(){var document = …var cd = new System.Net.Mime.ContentDisposition{// for example foo.bakFileName = document.FileName,// always prompt the user for downloading, set to true if you want// the browser to try to show the file inlineInline = false,};Response.AppendHeader("Content-Disposition", cd.ToString());return File(document.Data, document.ContentType);}

and Remember to use news {target="_blank"} in ActionLink parameter

版权声明:本文为博主原创文章,未经博主允许不得转载。

,功夫不负有心人。

James Zhous blog

相关文章:

你感兴趣的文章:

标签云: