Response.ContentType = "application/ms-word";
Response.AddHeader("Content-Disposition", "inline;filename=EmergencyPlan" + DateTime.Now.ToString("yyyyMMddHHmmss") + ".doc");
StringBuilder sb = new StringBuilder();
System.IO.StringWriter sw = new System.IO.StringWriter(sb);
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(sw);
sb.Append(" <html> <body runat='server'>");
lblContent.RenderControl(hw);
myGridViewYJQXD.RenderControl(hw);
myGridViewZHBAN.RenderControl(hw);
//输出图片
imgList.RenderControl(hw);
//
myGridViewTXQC.RenderControl(hw);
myGridViewYJCL.RenderControl(hw);
myGridViewYJK.RenderControl(hw);
sb.Append(" </body> </html>");
Response.Write(sb.ToString());
Response.End();
我用 上述方法将。net 页面中指定的控件内容导入到word中,但保存到本地后,图片无法显示,有什么解决办法吗,谢谢。急!
慕婉清6462132