private void write()
{
DMessage dmes = new DMessage();
Message mes = new Message();
mes = dmes.GetModel(Convert.ToInt32(ViewState["ID"]));
string filename = Server.UrlEncode("附件");
Byte[] b = mes.Annex;
//Response.ContentType = "Application/msword";
//word
Response.ContentType = "application/octet-stream";
Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode("附件", System.Text.Encoding.Unicode));
this.Response.Clear();
System.IO.Stream fs = this.Response.OutputStream;
fs.Write(b, 0, b.Length);
fs.Close();
this.Response.End();
}

浙公网安备 33010602011771号