System.Web.UI.WebControls.ImageField.Initialize Method

Initializes the System.Web.UI.WebControls.ImageField object.

Syntax

public override bool Initialize (bool sortingEnabled, System.Web.UI.Control control)

Parameters

sortingEnabled
Documentation for this section has not yet been entered.
control
The data control that contains the System.Web.UI.WebControls.ImageField.

Returns

Always returns true.

Remarks

The ImageField.Initialize(bool, System.Web.UI.Control) method is called by the data control with which the System.Web.UI.WebControls.ImageField object is associated to perform basic object initialization for instances of the field, before the field is ever added to a field collection. Data controls such as System.Web.UI.WebControls.DetailsView and System.Web.UI.WebControls.GridView call the ImageField.Initialize(bool, System.Web.UI.Control) method in their CreateChildControls methods before other methods such as CreateRow are called to create specific rows with data.

Call this method when you are writing a custom data-bound control that uses System.Web.UI.WebControls.DataControlFieldCell objects to perform basic initialization for an System.Web.UI.WebControls.ImageField object. Implement this method if your System.Web.UI.WebControls.ImageField-derived type requires any object initialization before it populates System.Web.UI.WebControls.DataControlFieldCell objects with data or controls in the ImageField.InitializeCell(DataControlFieldCell, DataControlCellType, DataControlRowState, int) method.

Requirements

Namespace: System.Web.UI.WebControls
Assembly: System.Web (in System.Web.dll)
Assembly Versions: 2.0.0.0
Since: .NET 2.0