当前位置: 代码迷 >> ASP.NET >> 急求一方法,实现把web页面中的所有内容写入到word中,该怎么处理
  详细解决方案

急求一方法,实现把web页面中的所有内容写入到word中,该怎么处理

热度:9089   发布时间:2013-02-25 00:00:00.0
急求一方法,实现把web页面中的所有内容写入到word中
小第我急求一方法具体如下:我在页面中添加了一个“按钮”,点击后就会调用Word并把该页面中的内容写入Word中,这在ASP.NET如何实现呢?请各位大虾帮帮忙,小弟在此谢过了!

------解决方案--------------------------------------------------------
可以试试Response.ContentType = "Application/msword" 性能不是很好 

---------------------主要代码
Response.Clear(); 
Response.Buffer= true; 
Response.Charset="utf-8";  

Response.ContentEncoding=System.Text.Encoding.GetEncoding("utf-8");     
Response.ContentType = "application/ms-word"; 
this.EnableViewState = false;
  相关解决方案