azollman
azollman

Reputation: 221

UpdatePanel in Repeater

I have a UserControl which contains voting buttons inside an UpdatePanel, and outside a Repeater, it works perfectly. In the repeater, clicking the button fires off the appropriate event. That event is supposed to update the text of a control within the User Control, and that update should be reflected when the UpdatePanel refreshes.

If tried the UpdatePanel in UpdateMode Always and Conditional (firing the Update event after making the changes to the properties in the _Click method, and the same problem happens both ways.

Is there something about how UpdatePanels behave in Repeaters that I'm missing?

Thanks.

Upvotes: 1

Views: 2446

Answers (2)

Manu
Manu

Reputation: 29143

The reason might have nothing to do with the update panel, but with the postback loosing track of your UserControl. Possibly assigning unique IDs to your user controls may help.

Upvotes: 1

Spencer Ruport
Spencer Ruport

Reputation: 35107

Your repeater is building a table correct? The problem is most likely that an update panel generates a div tag and it's probably outside any TR and TD tags so the browser doesn't know what to do with it.

http://www.netortech.com/blog/?articleid=8

Upvotes: 0

Related Questions