Response.ContentType = "application/vnd.android.package-archive";
Response.AddHeader("Content-Disposition", "attachment;filename=test.apk");
string filename = Server.MapPath("~/test.apk");
Response.TransmitFile(filename);
Response.End();//这一句必须得有,让网页停止输出。否则,文件就有了网页了,
转载于:https://www.cnblogs.com/--Sam--/articles/2062121.html