data binding expression for List<int>

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
 
P

Pavel Minaev

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)
 

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

Top