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 741589
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T08:38:59+00:00 2026-05-14T08:38:59+00:00

I have an arraylist: Dim downloadsarray As New ArrayList downloadsarray.Add(iconlink) downloadsarray.Add(imgpath) downloadsarray.Add(filesize) downloadsarray.Add(description) Which

  • 0

I have an arraylist:

 Dim downloadsarray As New ArrayList
        downloadsarray.Add(iconlink) 
        downloadsarray.Add(imgpath) 
        downloadsarray.Add(filesize) 
        downloadsarray.Add(description) 

Which is the datasource of my repeater:

 DownloadsRepeater.DataSource = downloadsarray
    DownloadsRepeater.DataBind()

Please can you tell me how I output the items in the array to the .aspx page. I usually use (when using sqldatareader as datasource):

    <%#Container.DataItem("1stcolumnnamestring")%>
    <%#Container.DataItem("2ndcolumnnamestring")%>

But this does not work when using the arraylist as datasource.

Thanks.

ps… I know how to use <%#Container.DataItem%> to dump everything but I need to get at the items in the array individually, not have them all ditched out to the page in one go. For example, item 1 contains a link, item 2 contains an image path, item 3 contains a description. I need to have them kick out in the correct order to build the link and icon correctly.

  • 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-14T08:39:00+00:00Added an answer on May 14, 2026 at 8:39 am

    In your example, you should be able to do this:

     <%# Container.DataItem.ToString() %> 
    

    Typically, when binding to a repeater, each data item holds the same type of data. In your example, each item is different – one is the link, one is the image path, etc. This is fine if all you want to display are those exact items (though I would then question whether you need a repeater to do the job).

    If your intent is to show multiple links, you should create a class for each link and add instance of the class to your ArrayList:

    class LinkThing {
      string link;
      string imagePath;
      etc... (do all the usual stuff with properties and constructors)
    }
    
    downloadsarray.Add(new LinkThing(link1, path1, size1, desc1));
    downloadsarray.Add(new LinkThing(link2, path2, size2, desc2));
    

    and in the aspx page:

     <%# ((LinkThing)Container.DataItem).link %> 
     <%# ((LinkThing)Container.DataItem).path %> 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 371k
  • Answers 371k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Much of the value of PEP-8 is to stop people… May 14, 2026 at 6:55 pm
  • Editorial Team
    Editorial Team added an answer I checked the AJAX response and found what is probably… May 14, 2026 at 6:55 pm
  • Editorial Team
    Editorial Team added an answer Menu Bar: Window->scale as shown in comments by chpwn. May 14, 2026 at 6:55 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.