如何在DetailsView中显示数据库中图片?我在设置SqlDataSource都可以看到数据库中的图片,但是绑定到DetailsView中,就不能显示出来了。哪位大侠知道怎么显示?
解决方案 »
- ASP.NET高手来
- 很简单的问题,就我不会的!
- 表字段自增的问题,高手请过来看看
- asp.net2.0角色授权管理的困惑.(实在是没分了)
- VS打包和卸载(怎样使卸载后还原到未安装软件的状态)
- 时间格式在SQL中如何比较(实在是没办法了,希望大家帮个忙)?
- 关于 asp.net 的 Word 打印
- 我有一个用foxpro 做的程序,当我打开时,老是提示 can not location microsoft visual foxpro support type library ,怎么解决,谢谢,
- 请问在vs.net中已安装好Mobile internet Toolkit 后如何使用该工具
- 在一个表里添加了一记录,怎样把这条记录的id号存入另一表中?
- 50分问题---急!关于上传文件的问题
- C#.net中,如何获取HTML控件的数量?
<asp:BoundField DataField="UserID" HeaderText="User ID" ReadOnly="True" SortExpression="UserID">
<ItemStyle Width="50%" BackColor="#EFF3FB" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Right" />
</asp:BoundField>
<asp:BoundField DataField="UserName" HeaderText="User Name" SortExpression="UserName">
<ItemStyle Width="50%" BackColor="#EFF3FB" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Right" />
</asp:BoundField>
<asp:ImageField HeaderText="Picture" DataImageUrlField="UserPic" DataImageUrlFormatString="image/pjpeg">
<ItemStyle Width="50%" BackColor="#EFF3FB" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Right" />
</asp:ImageField>
<asp:BoundField DataField="UserDesc" HeaderText="Description" SortExpression="UserDesc">
<ItemStyle Width="50%" BackColor="#EFF3FB" />
<HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" HorizontalAlign="Right" />
</asp:BoundField>
</Fields>
然后在那个位置加个image,url设置成xxx.ashx?id=345