摘要:
//检查文件,如果文件不存在则创建 privatevoidExistsFile(stringFilePath) {if(!File.Exists(FilePath)) { FileStreamfs=File.Create(FilePath); fs.Close(); } } 阅读全文
摘要:
private void DownloadFile(RepeaterCommandEventArgs e) { string fileName = e.CommandArgument as string; string path = this.Server.MapPath("../images"); string fullpath = string.Format("{0}/{1}", path, fileName); //这里主要用于下载 Response.ContentType = "application/octet-stream" 阅读全文