This documentation is archived and is not being maintained.

ImageField::Initialize Method

Initializes the ImageField object.

Namespace:  System.Web.UI.WebControls
Assembly:  System.Web (in System.Web.dll)

public:
virtual bool Initialize(
	bool enableSorting, 
	Control^ control
) override

Parameters

enableSorting
Type: System::Boolean

true if sorting is supported; otherwise, false.

control
Type: System.Web.UI::Control

The data control that contains the ImageField.

Return Value

Type: System::Boolean
Always returns true.

The Initialize method is called by the data control with which the 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 DetailsView and GridView call the Initialize 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 DataControlFieldCell objects to perform basic initialization for an ImageField object. Implement this method if your ImageField-derived type requires any object initialization before it populates DataControlFieldCell objects with data or controls in the InitializeCell method.

Windows 7, Windows Vista, Windows XP SP2, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP Starter Edition, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003, Windows Server 2000 SP4, Windows Millennium Edition, Windows 98

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0, 2.0
Show: