页面的导出代码如下: public void ExpertControl(System.Web.UI.Control source)
{
Response.AppendHeader("Content-Disposition", "attachment;filename=test.doc");
Response.ContentType = "application/ms-word";
Response.Charset = "UTF-8";
Response.ContentEncoding = System.Text.Encoding.UTF8;
source.Page.EnableViewState = false;
System.IO.StringWriter writer = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWriter = new System.Web.UI.HtmlTextWriter(writer);
WebForm4 picture = new WebForm4();
source.RenderControl(htmlWriter);
//输出
Response.Write(writer.ToString());
Response.Flush();
Response.End(); }
//在另外的函数中调用:
ExpertControl(this); //this 为页面的实例 其中包括一个Image控件,现在 的问题是:只有照片的内容没有在word中显示
火急!!!
求救!!!
万分感谢
{
Response.AppendHeader("Content-Disposition", "attachment;filename=test.doc");
Response.ContentType = "application/ms-word";
Response.Charset = "UTF-8";
Response.ContentEncoding = System.Text.Encoding.UTF8;
source.Page.EnableViewState = false;
System.IO.StringWriter writer = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter htmlWriter = new System.Web.UI.HtmlTextWriter(writer);
WebForm4 picture = new WebForm4();
source.RenderControl(htmlWriter);
//输出
Response.Write(writer.ToString());
Response.Flush();
Response.End(); }
//在另外的函数中调用:
ExpertControl(this); //this 为页面的实例 其中包括一个Image控件,现在 的问题是:只有照片的内容没有在word中显示
火急!!!
求救!!!
万分感谢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货