I have a static method that takes a parameter and returns a class. the class has a ReadOnlyCollection Property that i'd like to display in a asp:repeater. Is there a way to do this using LinqDataSource or ObjectDataSource? I got pretty close with ObjectDataSource, but since the method is returning a single class object, I couldn't get me repeater to bind to the Property.. Here's what I did:
ClassName: ClassName StaticMethod: StaticMethod(ParamName) ReadOnlyCollection: ClassName.Collection
<asp:objectdatasource
runat="server"
id="myData"
selectmethod="StaticMethod"
typename="ClassName"
>
<selectparameters>
<asp:parameter name="ParamName" defaultvalue="Value" />
</selectparameters>
</asp:objectdatasource>
<asp:repeater runat="server" datasourceid="myData">
<itemtemplate>
<%# Container.DataItem %>
</itemtemplate>
</asp:repeater>
So, This only returns the readonly collection object, not each item as i'd like. Is this possible without have actual code to instantiate the object?