string fileName = @"D:\app123.apk";
Response.Clear();
Response.AddHeader("content-disposition", "attachment;filename=app123.apk");
Response.ContentType = @"application/octet-stream";
System.IO.FileStream downloadFile =
new System.IO.FileStream(fileName, System.IO.FileMode.Open);
downloadFile.Close();
Response.WriteFile(fileName);
Response.Flush();
Response.End();
沒有留言:
張貼留言