后台http请求
作者:互联网
HttpResponse response = HttpContext.Current.Response; response.Buffer = true; response.Clear(); response.ClearContent(); response.AddHeader("Content-Disposeition",string.Format(attachment;filename="+HttpUtility.UrlEncode(excelname,Encoding.UTF8).ToString()+".xls",DateTime.Now.ToString("yyyyy"))); response.ContentType = "application/ms-execl"; response.ContentEncoding = System.Text.Encoding.UTF8; response.Charset="GB2312"; response.BinaryWrite(bytes); response..Flush(); response.Close();
标签:UrlEncode,http,请求,Encoding,UTF8,Charset,ToString,后台,response 来源: https://www.cnblogs.com/Y-o-u/p/16524875.html