DataListItemEventArgs Class

 

Provides data for the ItemCreated and ItemDataBound events of a DataList control. This class cannot be inherited.

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

System::Object
  System::EventArgs
    System.Web.UI.WebControls::DataListItemEventArgs

public ref class DataListItemEventArgs : EventArgs

NameDescription
System_CAPS_pubmethodDataListItemEventArgs(DataListItem^)

Initializes a new instance of the DataListItemEventArgs class.

NameDescription
System_CAPS_pubpropertyItem

Gets the referenced item in the DataList control when the event is raised.

NameDescription
System_CAPS_pubmethodEquals(Object^)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

The ItemCreated event is raised when an item in the DataList control is created.

The ItemDataBound event is raised when an item in the DataList control is data bound to a source.

For a list of initial property values for an instance of DataListItemEventArgs, see the DataListItemEventArgs constructor.

For more information about handling events, see NIB: Consuming Events.

The following example demonstrates how to define a handler for the ItemDataBound event. The code in the handler calculates the price of items in a DataList control. This example specifies the event handler declaratively, setting the event handler for the OnItemDataBound attribute of the DataList control.

No code example is currently available or this language may not be supported.

The following example demonstrates how to specify the event handler and programmatically add it to the ItemDataBound event in the Page_Load method.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 1.1

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: