<asp:DataList ID="dtlist" runat="server" RepeatColumns="4" CellPadding="5">
<ItemTemplate>
<asp:Image Width="100" ID="Image1" ImageUrl='<%# Bind("~/sqldread2/{0}") %>' runat="server" />
<br />
<ItemStyle BorderColor="Brown" BorderStyle="dotted" BorderWidth="3px" HorizontalAlign="Center" VerticalAlign="Bottom" />
</asp:DataList>
错误 - 数据绑定格式不正确。
我想打印以下图像数组。我想我想添加sqldread2
到DataList
,GridView
或ListView
while (sqldread2.Read())
{
Context.Response.BinaryWrite((byte[])sqldread2["Image"]);
Context.Response.ContentType = "image/jpg";
al.Add(sqldread2);
sDatAdp.SelectCommand = scmd1;
dtlist.DataSource = sqldread2;
dtlist.DataBind();
}