zoukankan      html  css  js  c++  java
  • Response.Charset与Response.ContentEncoding的区别

    protected void Button1_Click(object sender, EventArgs e)
        {
            Response.Clear(); //清空无关信息
            Response.Buffer= true; //完成整个响应后再发送
            Response.Charset = "GB2312";//设置输出流的字符集-中文
      Response.AppendHeader("Content-Disposition","attachment;filename=Report.doc");//追加头信息
            Response.ContentEncoding = System.Text.Encoding.GetEncoding("GB2312");//设置输出流的字符集
            Response.ContentType = "application/ms-word ";//输出流的MIME类型
            Response.Write(TextBox1.Text);
            Response.End();//停止输出
  • 相关阅读:
    CSS切割
    一台电脑 多个 tomcat
    CGI
    电源关系
    Monkey Test 命令使用
    html ul
    java 反射
    RTMP
    动态库
    flash 大文件上传
  • 原文地址:https://www.cnblogs.com/BluceLee/p/1725025.html
Copyright © 2011-2022 走看看