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

  • Home
  • SEARCH
  • 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 8296941
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T15:13:03+00:00 2026-06-08T15:13:03+00:00

I need to display multiple images from a database table and bind it to

  • 0

I need to display multiple images from a database table and bind it to a repeater, how do I go about doing it?

This is my current code, but I have no idea on how to proceed to display images

Below is my method to load data to the repeater:

public void loadNoofNewJobsCompany()
{
        DateTime lastlogged = Convert.ToDateTime(Session["LastLoginstaff"]);

        string sqlStr = "SELECT * FROM Job ";
        sqlStr += "WHERE ";
        sqlStr += "UpdatedDateCmpRep <= @loggedin";

        SqlCommand cmd = new SqlCommand(sqlStr, cnn);
        cmd.Parameters.AddWithValue("@loggedin", lastlogged);

        try
        {
            cnn.Open();

            SqlDataAdapter da = new SqlDataAdapter(cmd);

            DataTable dt = new DataTable();
            da.Fill(dt);

            Label2.Text = dt.Rows.Count.ToString();

            PagedDataSource pgdsc = new PagedDataSource();
            pgdsc.DataSource = dt.DefaultView;

            repeater1.DataSource = pgdsc;
            repeater1.DataBind();
        }
        catch (Exception ex)
        {
            Response.Write("Error: " + ex.Message);
        }
        finally
        {
            if (cnn != null)
            {
                cnn.Close();
            }
        }
    }

This is the repeater:

<asp:Repeater ID="repeater1" runat="server">
    <ItemTemplate>
        <div class="boxgrid caption">
            <%--<img src="../../img/google.png"  style="text-align:center"/>--%>
            <div class="cover boxcaption">
               <p>
                   <a href='../Job/ViewJobDetail.aspx?ID=<%# DataBinder.Eval(Container.DataItem, "JobID")%>' class="headerlink">
                   <%# getTitle(Eval("JobName").ToString()) %>
                   </a>
               </p>
               <p>
                   Salary Range:
                   <%# DataBinder.Eval(Container.DataItem, "JobSalaryRange")%>
               </p>
               ... (more stuff - not relevant here) .....
            </div>
         </div>
     </ItemTemplate>
</asp:Repeater>
  • 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-06-08T15:13:04+00:00Added an answer on June 8, 2026 at 3:13 pm

    For displaying images in gridview we need to create a Handler to read binary data from database.

    here is good example of it.

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

Sidebar

Related Questions

I need to display multiple images for a a car from a separate linked
I need some help finding a jQuery solution to display multiple images in a
I have a project in which I need to display multiple UITableView instances inside
I need a program that reads from multiple files and displays a report based
I need to display image and one button on fancybox popup but I can't
I need to display the parent from the first Element of input.xml Also I
i need to display images and play corresponding audio files one after the other.
I'm using this piece of code I found ( http://impnerd.com/wordpress-hack-add-post-images-to-your-homepage ) to display the
I need to display some images which can be scrolled horizontally. Only one image
i need to get multiple circle images when i click button. and i done

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.