引用:

using System.Web.Hosting;

 

            string filePathcsv = "";
            string file = "";
            string strFile = "LukfookGeovindu";
            strFile = strFile + DateTime.Now.ToString("yyyyMMddhhmmss");
            strFile = strFile + ".csv";
            //file = strFile;  teresaliu@lukfook.com.hk
            //file = HttpContext.Current.Server.MapPath("/ReportExcel/" + strFile); //此用法存在問題
            // Server.MapPath("/ReportExcel/" + strFile);//存在問題
            file = HostingEnvironment.MapPath("/ReportExcel/" + strFile);

 

相关文章:

  • 2021-12-06
  • 2021-09-23
  • 2021-11-29
  • 2021-10-17
  • 2021-05-21
  • 2021-09-29
  • 2021-08-29
猜你喜欢
  • 2021-07-04
  • 2021-07-10
  • 2022-12-23
  • 2021-08-31
  • 2021-07-04
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案