So, I have a repeater that displays a list of custom functions on a remote server. The repeater displays as follows.
serverName serviceName serviceStatus Button1 Button2
----------------------------------------------------------
Carolina StatsTracker Running update stop
...
..
.
The serviceStatus is rapped in an update panel inside the repeater
<asp:UpdatePanel ID="statusUpdate" runat="server" UpdateMode="Conditional" ChildrenAsTriggers="false">
<ContentTemplate>
<td><asp:Label ID="RowStatus" Width="100px" Text="Status..." runat="server" /></td>
</ContentTemplate>
</asp:UpdatePanel>
and in the code behind I send commands to the server via servercontroller and attempt to update the serviceStatus real time or at least as close as possible to real time. like this
if (svc.Status != ServiceControllerStatus.Stopped)
{
svc.Stop();
StatusLabel.Text = "Stopping";
statusUPdatePanel.Update();
while (svc.Status != ServiceControllerStatus.Stopped)
{
System.Threading.Thread.Sleep(1000);
svc.Refresh();
}
StatusLabel.Text = svc.Status.ToString();
statusUPdatePanel.Update();
}
System.Threading.Thread.Sleep(1000);
if (svc.Status != ServiceControllerStatus.Running)
{
svc.Start();
StatusLabel.Text = "Starting";
statusUPdatePanel.Update();
while (svc.Status != ServiceControllerStatus.Running)
{
System.Threading.Thread.Sleep(1000);
svc.Refresh();
}
StatusLabel.Text = svc.Status.ToString();
statusUPdatePanel.Update();
}
This issue is that the status doesn't update real time. It only updates to the final value which is either running or error. but never shows the stopping, starting, or stopped as it happens. also on the button click I disable the buttons while the serverController is running, a small user proofing step and which doesn't seem to cause the buttons to become disabled. I've read threw a large number of updatepanel issue post and think it might be a binding issue but i'm am not sure because i have tired the many of those suggested solutions to no avail.
Thanks in advance for any help.