Hi Geoff,

There must be something different about the Repeaters that bind fine
and the one that doesn't, swap them around to see if they still bound
fine.

Is the data you expecting to bind to really the data that repeater get
binded to? Maybe the data source really has no items, I say First
Programmer Debug Thyself!

If you think it is view state related then remove the view state from
the page and see if that changes anything.

Arjang



On 13 May 2010 08:44, Geoff Appleby <[email protected]> wrote:
>
> Argh. This is annoying me so much. I rarely do ASP.net stuff, so I'm always
> rusty...but normally I can google help. This time I just can't see the
> problem...
>
> I've got a repeater control that lives inside a label control. The
> repeater's itemtemplate dumps out hyperlink controls.
>
> The label is set to visible=false by default, and i hook the ItemDataBound
> event - if that event fires with a non-null data item, then I make the label
> visible.
>
> All works fine. Viewstate is enabled everywhere, and i'm rebinding all
> repeaters in every page_load.
>
> Most of the links over this page are just links. But I've got two
> linkbutton's that (obviously) generate a postback. When the postback fires i
> _still_ rebind that repeater - and the itemdatabound event fires multiple
> times (as it should) and the hyperlink controls get recreated. i've got
> EnableViewState="true" all through those controls i've just mentioned too,
> just in case.
>
> But after the page renders, the repeater control is simply not there. the
> rendered html is just a  <span></span> (for the wrapping label control).
>
> I'm positive its not viewstate related (since i'm rebinding each time and
> the rebind is working - i've walked through the code and watched the
> itemdatabound event fire multiple times. but i'm totally lost.
>
> there's three other repeaters on the same page, and each of _those_ still
> render fine.
> any thoughts?
>
>
> --
> Geoff Appleby
> Blog: http://blogs.crankygoblin.com/blogs/geoff.appleby/
>

Reply via email to