文件名是中文时,下载时文件名就是乱码,请各位老大帮助! Response.AppendHeader("Content-Disposition", "attachment; filename=" + Server.UrlEncode(fileName));----------------- 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 string strFileName = System.Web.HttpUtility.UrlEncode( System.Text.Encoding.UTF8.GetBytes("中文文件名.doc"));Response.AppendHeader("Content-Disposition", "attachment; filename=" + strFileName);Response.ContentType = "application/octet-stream";Response.BinaryWrite(bytes);Response.End(); 这里Response.AppendHeader("Content-Disposition", "attachment; filename=" + Server.UrlEncode(fileName)); 请问这是什么原因?强类型DataSet的表被Fill后内容没了? C#反射中出现的问题,请各位哥哥姐姐给予指教!~~~祝大家新年快乐! 如何生成不重复的随机数 这个函数错在哪里? c#如何实现IIS伪静态 非静态的字段、方法或属性“DotNetSpeech.ISpeechVoice.Resume()”要求对象引用 在不同命名空间中,一个疑问? 数据类型转换 C# 调用C++写的dll动态库 谁能帮我看看我写的c#调用这个的动态库的打开串口函数。 如何在一个事件响应程序中区分多个源 在c#中能不能编程实现重启,注销,关机???(谢谢) windowsform and webform?
Response.AppendHeader("Content-Disposition", "attachment; filename=" + strFileName);
Response.ContentType = "application/octet-stream";
Response.BinaryWrite(bytes);
Response.End();
Response.AppendHeader("Content-Disposition", "attachment; filename=" + Server.UrlEncode(fileName));