DataList Inside FormView

P

Phillip Ian

Seems like this should be straightforward enough, but I can't get
anything to show.

I have a class cClient which has as one of its properties a list of
addresses. Inside the cClient FormView, I want to have a DataList that
shows this list of addresses. I can't seem to get the binding right
though.

What I've got so far:

<asp:DataList ID="lstAddresses" runat="server" DataSource='<%#
Eval("AddressList") %>' DataMember="ToHTML">
</asp:DataList>

AddressList is of type List(of cAddress).
ToHTML is a function that returns the address all formatted pretty.

Can't think of what else you'd need to help, but just ask!

Thanks,

-Phil
 
S

Sanjeevakumar Hiremath

Just try making ToHTML a property rather than method. It might work.
 

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

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,044
Latest member
RonaldNen

Latest Threads

Top