ASP.NET lightweight refreshing inside user control

Terner

New Member
I have a web user control (for example with one Label) in repeater : \[code\]<asp:Repeater ...><ItemTemplate> <controls:MyControl/></ItemTemplate></asp:Repeater>\[/code\]I want to change MyControl.Label.Text in each MyControl separately with different "refresh time".I achieved this by placing a Timer, UpdatingPanel etc in MyControl like this\[code\]<asp:UpdatePanel ... "UpdateMode="Conditional"><ContentTemplate><asp:Label ...></asp:Label></ContentTemplate><Triggers><asp:AsyncPostBackTrigger ControlID="Timer1" EventName="Tick" /></Triggers><script runat="server" type="text/c#">protected void Timer1_Tick(object sender, EventArgs e){ Label1.Text = Some_new_text_from_some_method;}</script>\[/code\]In simple example I set the same small interval for every MyControl ( 2 second )The problem is that not every labels are refreshed probably because there is no time for do it. For example first six label are refreshed but two second time interval is over and rest label aren't refreshed yet...in next two second labels are refreshing again from first to last.Maybe a better solution would be not to use Ajax Timers but use js setInterval method and set Label.InnerHtml, but I don't how to do it in web user control. The difficulty is that I want fill Label.InnerHtml with data from code behind function.How I should do something like that properly ?
 
Top