Repeater and ArrayList

M

mavrick101

Hi,
I am trying to use arraylist (of strings) as Datasource for a repeater. what
do I write in item template?
DataBinder.Eval....???
The list only contains strings..
 
B

Brock Allen

If your DataSource is just a list of strings, then in your template just do:

<%# Container.DataItem %>

because DataItem is the item in the collection. A string in your case.
 
M

mavrick101

Thanks Brock. It worked.

Brock Allen said:
If your DataSource is just a list of strings, then in your template just do:

<%# Container.DataItem %>

because DataItem is the item in the collection. A string in your case.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top