Auto-Refresh Repeater Content

Stefan Lorenz asked on February 24, 2014 07:54

Hi,

I created a web part that triggers a postback to automatically refresh it's zone, basically following this guide, but making the postback with Javascript from the client side to supress it when the user moves the mouse. This works - a static HTML webpart with a {%CurrentDateTime%} in it updates fine.

However, in the same zone I have a repeater (Repeater with Effect) showing news items. Unfortunately the content of the repeater doesn't reload. For testing I disabled caching at all (globally, on the document in question, the repeater and the news items), but with no avail.

Any ideas?

Recent Answers


Juraj Ondrus answered on February 25, 2014 02:48

Hi,

This seems to be life cycle issue. Maybe the data are loaded before the postback is done. Are you reloading the data of the repeater after the postback? What is the exact code you are using?

Best regards, Juraj Ondrus

0 votesVote for this answer Mark as a Correct answer

Stefan Lorenz answered on February 25, 2014 04:48

How do I reload the data of the repeater after a postback? As I understand the article, the postback will reload the zone, so I thought any content within would reload, too.

In my .ascx I have a link that is clicked by some javascript and triggers the postback (automatically):

<a id="reloadLink" href="#" runat="server" onclick="return true" onserverclick="foo"/>

The foo() method is empty.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.