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

Related Questions

I have the following code which works well: Dim dept As New ArrayList Dim
I have two array lists dim Colors1 = New ArrayList Colors1.Add(Blue) Colors1.Add(Red) Colors1.Add(Yellow) Colors1.Add(Green)
I have this arraylist: ArrayList ftd = new ArrayList(); ftd.Add(new string[]{ foo1.txt, 01.01.2011 });
At the moment inside the class I have ArrayList which the objects are stored
I have an arraylist called fetchContactName() which returns all names (31) in my contact
I have an ArrayList of HashMap like this: ArrayList<HashMap<String, String>> playListSongs = new ArrayList<HashMap<String,
I have a Arraylist List<?> myList=new ArrayList(); myList = fetchQuery(); //fetches the list of
i have an arraylist of strings in my servlet which im passing forwarding using
I have an arraylist which has a class datastructure. public class empRec { public
I have two arraylists, and I would like to have a new arraylist with

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.