When replying to this post in the ASP.NET forums, Dave023 (I wish people would use their real names, we're not posting porn there or anything!) he mentioned using the System.Data.IDataRecord instead of the System.Data.Common.DbDataRecord I normally use when binding to list controls using IDataReaders (such as SqlDataReader for the most part). I happen to like this - mainly because System.Data is one of the default namespaces improted into a VS.NET ASP.NET code behind page and System.Data.Common isn't - so you don't have to remember to import another namespace. Another nice side effect of this is that it makes switching from DataSets with their DataRowView to SqlDataReaders a little more painless - since you don't have to modify the ASP.NET page template to import another namespace so you increase reusability whilst retaining the nice performance characteristics of 'explicit binding'.
Anyway Dave023 - thanks for that!
© 2025 Scott Galloway — Unlicense — All content and source code on this site is free to use, copy, modify, and sell.