.net 2.0 中点击下载文件的方法
Response.ContentType = "application/octet-stream";
string filename = e.CommandArgument.ToString();
filename = UploadHelper.getFileName(filename.Replace("/","\"));
Response.AddHeader("Content-Disposition", "attachment;filename=" + filename);
string filepath = Server.MapPath(e.CommandArgument.ToString());
Response.TransmitFile(filepath);
string filename = e.CommandArgument.ToString();
filename = UploadHelper.getFileName(filename.Replace("/","\"));
Response.AddHeader("Content-Disposition", "attachment;filename=" + filename);
string filepath = Server.MapPath(e.CommandArgument.ToString());
Response.TransmitFile(filepath);
Trackback: http://tb.blog.csdn.net/TrackBack.aspx?PostId=1764788