Datalist中的图片导出Excel
文字部分正常导出,但图片部分就显示一个红叉
这是咋个回事儿?
我的导出代码: HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=Excel.xls");
HttpContext.Current.Response.Charset = "UTF-8";
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.Default;
HttpContext.Current.Response.ContentType = "application/ms-excel";
this.listPricure.Page.EnableViewState = false;
System.IO.StringWriter tw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw);
listPricure.RenderControl(hw);
HttpContext.Current.Response.Write(tw.ToString());
HttpContext.Current.Response.End();
前台显示图片代码<tr>
<td>
<a href='../CallRoute/ReadPhoto.aspx?id=<%# Eval("PHOTO_ID") %>' target="_blank">
<img height="240px" width="320px" src='../CallRoute/readrealimage.aspx?id=<%# Eval("PHOTO_ID") %>' />
</a>
</td>
</tr>
大家伙给我看看为啥图片不能显示
文字部分正常导出,但图片部分就显示一个红叉
这是咋个回事儿?
我的导出代码: HttpContext.Current.Response.AppendHeader("Content-Disposition", "attachment;filename=Excel.xls");
HttpContext.Current.Response.Charset = "UTF-8";
HttpContext.Current.Response.ContentEncoding = System.Text.Encoding.Default;
HttpContext.Current.Response.ContentType = "application/ms-excel";
this.listPricure.Page.EnableViewState = false;
System.IO.StringWriter tw = new System.IO.StringWriter();
System.Web.UI.HtmlTextWriter hw = new System.Web.UI.HtmlTextWriter(tw);
listPricure.RenderControl(hw);
HttpContext.Current.Response.Write(tw.ToString());
HttpContext.Current.Response.End();
前台显示图片代码<tr>
<td>
<a href='../CallRoute/ReadPhoto.aspx?id=<%# Eval("PHOTO_ID") %>' target="_blank">
<img height="240px" width="320px" src='../CallRoute/readrealimage.aspx?id=<%# Eval("PHOTO_ID") %>' />
</a>
</td>
</tr>
大家伙给我看看为啥图片不能显示
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货