DataListItemEventArgs Class
Assembly: System.Web (in system.web.dll)
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 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.
The following example demonstrates how to specify the event handler and programmatically add it to the ItemDataBound event in the Page_Load method.
- AspNetHostingPermission for operating in a hosted environment. Demand value: LinkDemand; Permission value: Minimal.
- AspNetHostingPermission for operating in a hosted environment. Demand value: InheritanceDemand; Permission value: Minimal.