views:

10

answers:

1

There are two primary methods of getting data onto a page when it comes to associating that data to markup using some kind of Repeater; performing data binding in the markup (DataBinder.Eval, etc.) and overriding the OnItemDataBound event, finding the control on the page, and setting the value on the control in the code behind. I have my own opinion and understanding based on the MS-70-528 exam, but I wonder what the consensus here on SO is; what's the "best practice" or "accepted design pattern"? Even when there's some operations to perform on the data being bound.

+1  A: 

Try binding in markup as you can, that code is more maintainable than the code in OnItemDataBound. The intention is what ever is the simpler.

stackunderflow

related questions