Data Binding Mechanics

The next section will dig a little deeper and cover some of the nuts and bolts of the data binding system for ASP.NET, including some of the most commonly called methods and properties, such as Container.DataItem, DataBinder.Eval, and the ItemDataBound event.

Container.DataItem

Container.DataItem is a property on a class that is made available to ASP.NET controls at runtime. The Container class instance's DataItem property indicates the item to which the current control's container has been bound. This property is used within templates to provide additional user interface functionality. Templates are formatting models that are instantiated for each row bound. When creating an item template, you can use Container.DataItem ...

Get Microsoft® Visual C#® .NET 2003 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.