Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6896987
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T07:06:46+00:00 2026-05-27T07:06:46+00:00

I have a book database(2 books in total right now) where for each book

  • 0

I have a book database(2 books in total right now) where for each book i have a row called ‘Image’ that contains the name of the images.
For example. cprog.jpeg and asm.jpeg

Using the repeater i can display the book information like name, author, etc. But i dont know how to get the images to display. The images are stored in the images folder.

here is the aspx which is the issue? since, it displays the bookname and description just fine.

<asp:Repeater ID="Repeater1" runat="server">
        <ItemTemplate>
 <%# DataBinder.Eval(Container.DataItem, "BookName") %>
 <hr>
 <%# DataBinder.Eval(Container.DataItem, "BookDescription") %>
 <td width="100px">
  <p align="left">


 <img src= '<%# DataBinder.Eval(Container.DataItem, "Image") %>.jpeg'  
 alt="" style="height:200px;width:200px;border:1px solid gray;"/>

  </td>
  </p>

Code behind

String connectionString = "Data Source=" + Server.MapPath(@"~\App_Data\bookDB.db");
        String selectCommand = String.Format("Select * from Book where CategoryName = '{0}'", Request.QueryString);
        SQLiteConnection myConnection = new SQLiteConnection();
        myConnection.ConnectionString = connectionString;
        myConnection.Open();
        SQLiteDataAdapter dataAdapter = new SQLiteDataAdapter(selectCommand, myConnection);

        myConnection.Close();
        // DataSet ds = new DataSet();
        dataAdapter.Fill(ds2);


        DataTable table = new DataTable();
        dataAdapter.Fill(table);
        Repeater1.DataSource = table;
        Repeater1.DataBind();

Once, when i ran the project the broken image appeared for a second and then disappeared. I have spent the last 2 days trying to get this with no avail…
Thank you.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T07:06:46+00:00Added an answer on May 27, 2026 at 7:06 am

    Assuming the images folder is /images, adding the folder name and deleting the extension (already in database as mentioned in your question) should display the image:

    <img src='/images/<%# DataBinder.Eval(Container.DataItem, "Image") %>'  
    alt="" style="height:200px;width:200px;border:1px solid gray;"/>
    

    If that doesn’t yield the desired result, check the html output and compare it to the real url – what’s different?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The code below works great. I have a MySQL database that contains book titles
I have a MySQL database called bookfeather. It contains 56 tables. Each table has
I have some information in my database like 'author', 'book' etc., that are all
I have a database that keeps track of books. The books table looks like
I have a database as follows: ------------------------------ BOOK NAME | BOOK FORMAT | COUNT
i'm having a problem with my database. I have the folowing: create table book
I have a book called Spring Recipes which seems very good so far, but
I have a book, Essential ActionScript 3 (O'Reilly), to learn about using that language.
I have a book class, then a novel- and a science book class that
i have a form which inserts book information into the database. however it is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.