zoukankan      html  css  js  c++  java
  • 将服务器上的一个.doc文档另存为到客户端

    protected void applyLetter_Click(object sender, EventArgs e)
        {
            string strFileName = Server.MapPath("../InvitationLetterApplicationFormForVisa.doc");
            FileInfo DownloadFile = new FileInfo(strFileName);
            Response.Clear();
            Response.ClearHeaders();
            Response.Buffer = false;
            Response.ContentType = "application/octet-stream";
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8));
            Response.AppendHeader("Content-Length", DownloadFile.Length.ToString());
            Response.WriteFile(DownloadFile.FullName);
            Response.Flush();
            Response.End();
            string strWhere = "UserName='" + Session["UserNameEN"].ToString() + "'";
        }
  • 相关阅读:
    express学习
    安装MongoDB步骤
    js事件流
    关于html,css,js三者的加载顺序问题
    重写JS的鼠标右键点击菜单
    深入JS原型与原型链
    eureka学习(二)
    eureka学习(一)
    mysql学习-explain中的extra
    mysql学习-explain
  • 原文地址:https://www.cnblogs.com/MaxWoods/p/1326136.html
Copyright © 2011-2022 走看看