I used to advocate explicit casting in this newsgroup a while ago. There
was a strong opposition to it from quite experienced developers claiming
that the performance gain is not that significant comparing with the
advantages of using Eval. The major one is that with Eval you can change
your datasource without touching your databinding expressions. I can hear
this argument very well.
--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
Alexey Smirnov said:
DataBinder.Eval is a helper function to evaluate data, and it use
reflection (late binding) to find right property in your item. You can
display data without using DataBinder.Eval, but you need to cast
Container.DataItem to the right type.
Note: Because DataBinder.Eval performs late-bound evaluation, using
reflection at run time, it can cause performance to noticeably slow
compared to explicit casting.