What Was I Thinking?

Follies & Foils of .NET Development
posts - 87 , comments - 254 , trackbacks - 0

October 2010 Entries

ASP.NET Data Binding from a Latebound IEnumerable<T>
Many of the examples of databinding use datasource or objectsource controls. I prefer to databind from the code-behind. I feel I have finer control over how to data is prepared before I load it. The downside to doing this “late binding” of the data, and I can’t use the strongly typed names in my declarative markup. The following code fails because the compiler can’t resolve the “Products” reference. Code Snippet <asp:DataList ID="DataList1" runat="server" RepeatColumns="1" DataSource='<%#Products%... ......

Posted On Friday, October 8, 2010 10:17 AM | Comments (3) | Filed Under [ Visual Studio ]

Powered by: