/// <summary> /// 下载导入推送模板 /// </summary> //public void DownLoadPushTemplate() //{ // // _dl.DownLoadPushTemplate(); //} /// <summary> /// 下载导入推送模板 /// </summary> public void DownFile() { string filePath = "/PushTemplate/PushTemplate.xlsx"; string absoluFilePath = Server.MapPath(filePath); ResponseSugar.ResponseFile(absoluFilePath, "PushTemplate.xlsx"); }
protected void Page_Load(object sender, EventArgs e) { var path = Server.MapPath(@"~\TestFIle\ok.docx"); var pathName = FileSugar.GetFileName(path); ResponseSugar.ResponseFile(path, pathName); }