Just been reading this article on Codeproject.com...hmm...I have a few issues with how he does things:
- DataBinder.Eval - I have what is becoming an obsession about this now - there's just NO NEED for this in most cases, it sucks in terms of performance (you can typically lose about 20% compared to the stongly typed method. I've posted a couple of times about this hereand here.
- OnItemDataBound - now, I've yet to do a benchmark comparing to member methods (just reminded myself actually, I might do one this weekend). I use to use this method all the time for nested repeaters until I saw the light and moved on to Member Methods - which as well as feeling a lot 'cleaner' than the event based approach - I feel will be significantly faster - since it avoids the overhead of events and casting required for the ItemDataBound approach.
So anyway, I will put my money where my mouth is and finally get down to writing an article about the relative merits of these approaches...but the bits I've mentioned above are based on a LOT of uses in real applications - believe me I make these suggestions not on a whim but based on a lot of trial and error!