1)
Response.Redirect("download.aspx?path=" + HttpContext.Current.Server.MapPath("~/现场安装单信息.xls") + "&FileName=" + HttpUtility.UrlDecode("现场安装单信
息.xls"));
download.aspx.cs
String strrealpath = Request.QueryString["path"].ToString();
string filename = Request.QueryString["FileName"].ToString();
Download(HttpUtility.UrlDecode(strrealpath), HttpUtility.UrlDecode(filename));
2)
public string strFileName = "中文V1.pdf";
public string strDownLoadFileName = "中文V1.pdf";
strDownLoadFileName = HttpUtility.UrlEncode(strDownLoadFileName);
strFileName = HttpUtility.UrlEncode(strFileName);
<a href="download.aspx?path=d:\download\<%=strDownLoadFileName%>&FileName=<%=strFileName%>" target="_blank" style="text-decoration:underline">帮助文
档下载</a>
download.aspx.cs
string strrealpath = Request.QueryString["path"].ToString();
string filename = Request.QueryString["FileName"].ToString();
Download(HttpUtility.UrlDecode(strrealpath), HttpUtility.UrlDecode(filename));