我在网上找了两种方法,都不理想,第一种打开文件或另存时中文名是乱码;第二种另存文件时为乱码,我的数据库是sqlserver  
第一种:  
string  strfilename=dr["wjmc"].ToString();  
Response.AppendHeader("Content-Disposition",  "attachment;  filename=\""  +strfilename  +  "\"");  
strfilename=HttpUtility.UrlEncode(Request.ApplicationPath+"/file/"+strfilename,System.Text.Encoding.UTF8);  
Server.Transfer(HttpUtility.UrlDecode(strfilename));  
 
第二种:  
string  fileName=dr["wjmc"].ToString();  
string  filePath  =  @"/xbgwmis/file/";  
FileInfo  file  =  new  FileInfo(System.Web.HttpContext.Current.Server.MapPath(filePath)+fileName);  
Response.Charset  =  "utf-8";  
Response.ContentEncoding  =  System.Text.Encoding.UTF8;  
Response.AddHeader("Content-Disposition",  "attachment;  filename="  +HttpUtility.UrlEncode(Request.ApplicationPath+"/file/"+fileName,System.Text.Encoding.UTF8));    
Response.AddHeader("Content-Length",  file.Length.ToString());    
Response.WriteFile(file.FullName);    
Response.End();