Display (Bind) Image in ASP.Net DataList from database using C# and VB.Net

Last Reply 28 days ago By pandeyism

Posted 28 days ago

I am trying to display image from database to datalist but image are not getting display 

here is datalist 

<fieldset style="width:53%">
    <legend>Repeat Cloumns in Datalist</legend>
    <asp:DataList ID="dlemp" runat="server" CellPadding="5" RepeatColumns="4"
           CellSpacing="5" RepeatDirection=" Horizontal">
           <HeaderStyle VerticalAlign="Middle" Font-Size="20PX" BackColor="Black" ForeColor="White" />
      <HeaderTemplate> 
      Customer Details  
      </HeaderTemplate>
    <ItemTemplate>
      <%--<asp:Image ID="imgEmp" runat="server" Width="100px" Height="80px" ImageUrl='<%# Eval("Data").ToString() %>' style="padding-left:20px"/>--%><br />
       <asp:Image ID="imgEmp" runat="server" ImageUrl='<%# Eval("Data") %>' Height="100px" Width="100px" />
      
            <b>Customer Name: </b>             
                <asp:Label ID="lblename" runat="server" Text='<%# Eval("CustomerName") %>'></asp:Label> <br />
                <b>Image Name:</b>
                <asp:Label style="text-align:justify" ID="lblName" runat="server" Text='<%# Eval("Name") %>'></asp:Label><br />
           <b>Customer ID: </b> <asp:Label ID="lblID" runat="server" Text=' <%# Eval("CustomerID") %>'></asp:Label>
               </ItemTemplate>
               <FooterTemplate>        
               </FooterTemplate>
    </asp:DataList>
</fieldset>

Please guide.