how to bind a repeater with an arraylist

how to bind a repeater with an arraylist

am 03.01.2008 11:30:25 von paramvir.deol

i was trying to bind a repeater with an arraylist.
what i was not able to figure out was what should i use in the
Eval("") expression.

Any suggestions .

Re: how to bind a repeater with an arraylist

am 03.01.2008 11:39:36 von Eliyahu Goldin

Regular syntax, like

<%# Eval("ProductID") %>

ProductID is supposed to be a public property defined on the objects stored
in the arraylist.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


"psycho" wrote in message
news:d3472f2d-69ef-4ee1-9b62-4c1c0809d277@p71g2000hsd.google groups.com...
>i was trying to bind a repeater with an arraylist.
> what i was not able to figure out was what should i use in the
> Eval("") expression.
>
> Any suggestions .
>

Re: how to bind a repeater with an arraylist

am 03.01.2008 11:55:03 von paramvir.deol

On Jan 3, 3:39 pm, "Eliyahu Goldin"
wrote:
> Regular syntax, like
>
> <%# Eval("ProductID") %>
>
> ProductID is supposed to be a public property defined on the objects stored
> in the arraylist.
>
> --
> Eliyahu Goldin,
> Software Developer
> Microsoft MVP [ASP.NET]http://msmvps.com/blogs/egoldinhttp://usableasp.net
>
> "psycho" wrote in message
>
> news:d3472f2d-69ef-4ee1-9b62-4c1c0809d277@p71g2000hsd.google groups.com...
>
> >i was trying to bind a repeater with an arraylist.
> > what i was not able to figure out was what should i use in the
> > Eval("") expression.
>
> > Any suggestions .

but i have stored only the integer values in the list.

Re: how to bind a repeater with an arraylist

am 03.01.2008 13:14:17 von marss

On 3 Січ, 12:55, psycho wrote:

> but i have stored only the integer values in the list.

Eval("SomeProperty") is a short for
DataBinder.Eval(Container.DataItem, "SomeProperty"). So, if your
arraylist contains only integers, you can bind it in the following
way:



<%# Container.DataItem %>



Regards,
Mykola
http://marss.co.ua

Re: how to bind a repeater with an arraylist

am 03.01.2008 14:31:53 von paramvir.deol

On Jan 3, 5:14 pm, marss wrote:
> On 3 Січ, 12:55, psycho wrote:
>
> > but i have stored only the integer values in the list.
>
> Eval("SomeProperty") is a short for
> DataBinder.Eval(Container.DataItem, "SomeProperty"). So, if your
> arraylist contains only integers, you can bind it in the following
> way:
>
>
>
> <%# Container.DataItem %>
>

>

>
> Regards,
> Mykolahttp://marss.co.ua

it worked.
thanks