I have a class that looks like this:
public class Person
{
public string Name { get; set; }
public string Thing() {
...
}
...
}
If I have an IList<Person>
that I'm using as a data source for a DataList control, and the DataList looks like this:
<asp:DataList runat="server" RepeatColumns="1" ID="Profiles">
<ItemTemplate>
<%#Eval("Name") %>
</ItemTemplate>
</asp:DataList>
How do I replace the Name
property of the data source with a call to the data source object's Thing()
method?