存到数据库中的时候是以DocumentText方法保存上传到数据库中的,现在想读取出来,我是用下面的方法读的
int num = pModel.Reason1.Length;
Response.ContentType = "Application/msword";
Response.AddHeader("Content-Disposition", "attachment; filename=new.doc");
Response.AddHeader("Content-Length", num.ToString());
this.Response.Clear();
System.IO.TextWriter sd = this.Response.Output;
sd.Write(pModel.Reason1, 0, num);
sd.Close();
但是读取后文字的格式不一样了,请问下应该怎么该?
当然,word是二进制文件,不要用ntext,应该用binary
http://www.cnblogs.com/xinchun/p/3482390.html