Click here to Skip to main content
15,893,381 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I am bind the datalist fields at runtime. I have a binary data value of images in my SQL database. I need to display all my data's with images. All my datas are displayed but images are not displayed at runtime. How can i do that. Anyone please help me.

i can given the ???? symbol inside the aspx file. What code is need there to fullfill my requirement?

Aspx file :


XML
<asp:DataList ID="DataList1" runat="server" RepeatColumns="3">
                 <ItemTemplate>
            <table style=" background-color:Window; border-bottom:1px solid #CDCDCD; width:300px; height: 150px" cellpadding="2"><tr><td>
            Baby Name <td>:</td></td><td width="50%">

            <%#DataBinder.Eval(Container.DataItem, "Baby_Name")%>
            <tr ><td>
            Father Name <td>:</td></td><td width="50%">
            <%#DataBinder.Eval(Container.DataItem, "Father_Name")%></td></tr>
            <tr ><td width="50%">
            Mother Name <td>:</td></td><td>
            <%#DataBinder.Eval(Container.DataItem, "Mother_Name")%></td></tr>
            <tr ><td width="100">
              ???????????????????????????????????????????
            </td></tr>
           </table>
            </ItemTemplate>

                </asp:DataList>




Aspx.cs File ::

C#
public partial class Today_Birthday_Babys : System.Web.UI.Page
{
    UserClass ObjUser = new UserClass();
 
    protected void Page_Load(object sender, EventArgs e)
    {
        DataSet ds = new DataSet();
        DateTime dob = DateTime.Now;
        ds = ObjUser.select_birthdaybaby(dob);
        DataList1.DataSource = ds;
        DataList1.DataBind();
    }
}
Posted
Updated 26-Mar-13 3:05am
v3
Comments
StianSandberg 26-Mar-13 9:07am    
First of all you should read about html tables. table, tr and td elements. Just my advice

You can use HTTPHandlers. Pass image id as querystring to the handler and it will return the image. This is a very good example[^]
 
Share this answer
 
Comments
SnvMohan 3-Apr-13 1:26am    
Thank you so much.............That link helped me a lot

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



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