Hello,
that's probably one corner-stone with the "DataBinder.Eval"-thinking that
you don't need to know the data source row type exactly so changing the data
source type for a reason or another would not require a change in the
databinding expressions as well. So it can help reducing effects of changes,
though it also brings performance cost. (one of those famous design
decisions :-) )
Sometimes it isn't that clear but for example if you bind to a DataReader
the type of the Container.DataItem is System.Data.Common.DBDataRecord, with
DataTable or DataView, it is System.Data.DataRowView. Or with a custom
collection it is of course type of the custom collection item. But if
developer really wants to, it isn't of course mystery (if you know how to
check the type).
If speaking of web forms, Container refers with a DataGrid to a DataGridItem
(DataList->DataListItem, Repeater->RepeaterItem) and DataItem is a property
of it.
--
Teemu Keiski
ASP.NET MVP, AspInsider
Finland, EU
http://blogs.aspadvice.com/joteke