在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
string path=Server.MapPath(@"/dlia/download/")+filepath+"\\"+(string)filename; System.IO.FileInfo theFile = new System.IO.FileInfo( path ); Response.Clear(); Response.AddHeader("Content-Disposition","attachment; filename=" + theFile.Name); Response.AddHeader("Content-Length",theFile.Length.ToString()); Response.ContentType="application/octet-stream"; Response.WriteFile(theFile.FullName); Response.End(); 出现一个问题就是如果filename是中文,下载之后显示乱码,请教一下应该怎么解决? |
请发表评论