DataBoundControlAdapter.PerformDataBinding Method
Assembly: System.Web (in system.web.dll)
protected void PerformDataBinding ( IEnumerable data )
protected internal function PerformDataBinding ( data : IEnumerable )
Not applicable.
Parameters
- data
An IEnumerable of Object to be bound to the derived DataBoundControl.
The PerformDataBinding method is called in place of the DataBoundControl.PerformDataBinding method when a DataBoundControlAdapter control adapter is attached to a control derived from the DataBoundControl class.
Typically, an override of DataBoundControl.PerformDataBinding iterates through data, creating distinct names and values when necessary, and saves it to an internal collection. Usually, RenderContents or a similar method of the DataBoundControl will populate the user interface or child controls from that internal collection.
Notes to Inheritors: Override the PerformDataBinding method when specialized binding logic is required for the target browser—for example, when item names must be constructed differently than for the general usage of the control. The PerformDataBinding base method calls DataBoundControl.PerformDataBinding. You should call the PerformDataBinding base method only if you require the data binding functionality of the DataBoundControl.The following code example shows how to override the PerformDataBinding collection to save the data source to a one-dimensional ArrayList object and add row separators. It also shows how to override the RenderContents method to render the ArrayList as a list of fields separated by <br /> tags.
Windows 98, Windows Server 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.