• 怎么下载xml文件呢 C# vs2005  谢谢!~


    private void FileDownload(string FullFileName)  //下载xml文件
    {
        FileInfo DownloadFile = new FileInfo(FullFileName);
        this.Response.Clear();
        this.Response.ClearHeaders();
        this.Response.Buffer = false;
        this.Response.ContentType ="application/octet-stream";
        this.Response.AppendHeader("Content-Disposition","attachment;filename="+HttpUtility.UrlEncode(DownloadFile.FullName,System.Text.Encoding.UTF8));
        this.Response.AppendHeader("Content-Length",DownloadFile.Length.ToString());
        this.Response.WriteFile(DownloadFile.FullName);
        this.Response.Flush();
        this.Response.End();
    }

     

    给一个完整的 绝对路径 就OK!!

     

    ------------------------广告之家 http://www.adggs.com

  • 相关阅读:
    git升级
    redis集群
    redis安装
    escript
    git搭建仓库与服务器
    svnsync
    post_commit.sh
    nvm安装和使用
    quartz 定时器
    Oracle flashback恢复误删的数据或表
  • 原文地址:https://www.cnblogs.com/binlunia/p/11267783.html
Copyright © 2020-2023  润新知