Why do you use OnItemCreated
instead of OnItemDataBound
? Have you disabled ViewState
?
In general OnItemDataBound
is the event that should be used for databinding. OnItemCreated
must be used if you need to create controls dynamically since this event is triggered on every postback and not only if the repeater gets databound.