日期:2014-05-17  浏览次数:20472 次

将asp.net页面所显示的内容导出word文件
本帖最后由 u011497412 于 2014-02-20 15:31:47 编辑

如上图所示的页面,将此页面导出word文件。请各位大神帮帮忙。我在网上找了许多,都不符合我的需求。导出的word文件中,只有题,却没有答案。
------解决方案--------------------
        Response.Clear();
            Response.Buffer = true;
            Response.AppendHeader("Content-Disposition", "attachment;filename=" + DateTime.Now.ToString("yyyyMMdd") + ".doc");
            Response.ContentEncoding = System.Text.Encoding.UTF8;
            Response.ContentType = "application/msword";
            this.EnableViewState = false;




这样就好了