Click here to Skip to main content
15,911,132 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
JavaScript
<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>


Error - Data bind is not well formatted.

i want to print following image array.... i think i want to add sqldread2 to datalist, gridview or list view

C#
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();
                    }
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900