Response.Buffer = true; Response.Clear(); Response.Charset = "gb2312"; Response.ClearContent(); Response.ClearHeaders(); Response.ContentE... ...
Response.Buffer = true; Response.Clear(); Response.Charset = "gb2312"; Response.ClearContent(); Response.ClearHeaders(); Response.ContentEncoding = System.Text.Encoding.GetEncoding("gb2312"); Response.ContentType = "application/ms-word"; Response.AppendHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode("文檔.doc", System.Text.Encoding.UTF8)); Response.Write("<html xmlns:v='urn:schemas-microsoft-com:vml' xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:w='urn:schemas-microsoft-com:office:word' xmlns:m='http://schemas.microsoft.com/office/2004/12/omml' xmlns='http://www.w3.org/TR/REC-html40'><head></head><body lang=ZH-CN>" + MsgContent);