tags:

views:

365

answers:

1

I want to bind my ListView control to a generic list of objects?

I thought I could code:

listView1.DataSource = fCol.ToList; listView1.DataBind();

I get a cannot convert to object error.

I'm sure in Windows programming you use the BindingSource object. Is there a web forms equivalent?

+4  A: 

You are missing the parentheses from the end of your ToList() call.

Steve Willcock
Ahhh... Can't believe I missed that! I'm blaming on on the long weekend. :)
littlechris
Still had to set up the LayoutTemplate and the ItemTemplate as well. Not a having a good day!
littlechris
lol, sounds like you need a rest :)
Steve Willcock