data binding expression for List<int>

  • Thread starter Thread starter Danny Ni
  • Start date Start date
D

Danny Ni

Hi,

I am using a method created by other, the function returns List<int>. If I
bind this to a Repeater, what should the data binding expresssion looks
like? <%# Eval("I don't know what to put in here") %>

TIA
 
Hi,

I am using a method created by other, the function returns List<int>. If I
bind this to a Repeater, what should the data binding expresssion looks
like?  <%# Eval("I don't know what to put in here") %>

Eval() is specifically for accessing properties of object, you do not
need that here. Just use:

<%# GetDataItem() %>

(this is Page.GetDataItem() that gets called here, in case you want to
look that up on MSDN)
 
Back
Top