views:

196

answers:

1

i have a repeater inside a dynamic control, i am trying to get the items of the repeater in a postback prior to databinding. this seems to work when i have a static repeater where the items are still intact, but when my repeater is inside a dynamic control and i try to get "repeater.Items", the count is always 0.

is this normal behavior for repeaters when being placed inside a dynamic control?

A: 

It is normal. Viewstate is not restored in dynamically created controls. Have a look at this article: http://msdn.microsoft.com/en-us/library/kyt0fzt1(VS.71).aspx

JasonS