Handling Repeater Control Events

The Repeater control supports the following events:

DataBinding Raised when the Repeater control is bound to its data source.

ItemCommand Raised when a control contained in the Repeater control raises an event.

ItemCreated Raised when each Repeater item is created.

ItemDataBound Raised when each Repeater item is bound.

The page in Listing 13.5 illustrates how you can use the DataBinding, ItemCommand, and ItemDataBound events. This page uses a Repeater control to update, delete, and insert database records (see Figure 13.4).

Figure 13.4. Editing database records with the Repeater control.


Listing ...

Get ASP.NET 4 Unleashed now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.