What Was I Thinking?

Follies & Foils of .NET Development
posts - 77, comments - 203, trackbacks - 0

My Links

News

Archives

Post Categories

Check These Out

Gurus

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 08, 2010 10:17 AM | Feedback (2) | Filed Under [ Visual Studio ]

Powered by: