我正在尝试通过单击此代码的按钮在客户端计算机上获取 .csv 文件:
Response.Clear();
Response.ClearContent();
Response.ClearHeaders();
Response.ContentType = "text/csv"; ;
Response.ContentEncoding = System.Text.Encoding.Unicode;
Response.AddHeader("Content-Disposition", "attachment; filename=WBS.csv");
Response.BinaryWrite(System.Text.Encoding.Unicode.GetPreamble());
string output = "WBSCode,Description,TerritoryCode,Amount" + "\n";
Response.Write(output);
问题是代码正在执行,但我的机器中没有 .csv 文件.. 有什么问题?我第一次这样做