下载代码如下(这段代码是没问题的):string filePath = DownFiletbl.Rows[e.NewEditIndex].Cells[9].Text;
int intStart = filePath.LastIndexOf("\\") + 1;
string saveFileName = filePath.Substring(intStart, filePath.Length - intStart);
string FileType = "text/html";
Response.Clear();
Response.Buffer = true;
Response.ContentEncoding = System.Text.Encoding.GetEncoding("UTF-8");
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(saveFileName, Encoding.UTF8).ToString());
Response.ContentType = FileType; Response.WriteFile(filePath);
Response.Flush();
Response.Close();
Response.End();运行后,下载界面没弹出,点左下角提示如下:行:709
字符:17
错误:Sys.ArgumentException:..一串乱码代码:0
URL:...不知道我的页面中哪里有错造成的,第一次写网页程序,调试太麻烦了,求大侠指点,谢谢
int intStart = filePath.LastIndexOf("\\") + 1;
string saveFileName = filePath.Substring(intStart, filePath.Length - intStart);
string FileType = "text/html";
Response.Clear();
Response.Buffer = true;
Response.ContentEncoding = System.Text.Encoding.GetEncoding("UTF-8");
Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(saveFileName, Encoding.UTF8).ToString());
Response.ContentType = FileType; Response.WriteFile(filePath);
Response.Flush();
Response.Close();
Response.End();运行后,下载界面没弹出,点左下角提示如下:行:709
字符:17
错误:Sys.ArgumentException:..一串乱码代码:0
URL:...不知道我的页面中哪里有错造成的,第一次写网页程序,调试太麻烦了,求大侠指点,谢谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货