DataListItemEventArgs(DataListItem) Constructor

Definition

Initializes a new instance of the DataListItemEventArgs class.

C#
public DataListItemEventArgs(System.Web.UI.WebControls.DataListItem item);

Parameters

item
DataListItem

A DataListItem object that represents an item in the DataList control.

Examples

The following example demonstrates how to create and initialize a new instance of the DataListItemEventArgs class.

C#
void Item_Created(Object sender, DataListItemEventArgs e)
{
   DataListItemEventArgs item_arg = new DataListItemEventArgs(e.Item);
}

Remarks

Use this constructor to create and initialize a new instance of the DataListItemEventArgs class.

When an instance of DataListItemEventArgs is created by a call to this constructor, the following property is initialized to the specified value.

Property Initial Value
Item The value of the item parameter.

Applies to

Product Versions
.NET Framework 1.1, 2.0, 3.0, 3.5, 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1