Repeater DateItem
-
I have a Repeater with many rows. However, when I foreach through the items the DataItem is null. Why can I not get the DataItem from my Repeater? Or maybe a better question would be, how do I get the DataItems from my repeater? thank you -- modified at 13:11 Thursday 12th January, 2006
-
I have a Repeater with many rows. However, when I foreach through the items the DataItem is null. Why can I not get the DataItem from my Repeater? Or maybe a better question would be, how do I get the DataItems from my repeater? thank you -- modified at 13:11 Thursday 12th January, 2006
Hi Dominic The DataItem property for your controls are only available right after calling the Databind Method of the repeater, and only on the ItemCreated / ItemDataBound Event, but beware: ItemCreated is called after each postback, so try to use DataItem only in the ItemDataBound event. after that, it no longer exists. So This event (ItemDataBound) is raised for each item being databound to the source you assigned. The item is found in the event's arguments. Just a plus in case you didn't know. daniero