Hello,
We have the following problem :
1. There is "START" button on Web Form which on server's event "clicked" starts some process - "Process.Start(SomeProcess);"
and then calls "UpdateProgressBar" function.
The process inside looks like this:
2. Update ProgressBar function just reads the values from file and updates the progress bar, it's working.
3. We added "STOP" button to form to stop the progress bar loop.
Problem:
Everything We have tried to exit the loop isn't working, including adding in onClientClick of "STOP" Button {ProgressData.OperationComplete = true }
and then checking the value in server's UpdateProgressBar() inner loop. The change of progress values on client just doesn't affect
values on server.
Also tried to add HiddenField and update it on onClientClick of "STOP" Button, the sercer inside UpdateProgressBar() inner loop also doesn't see any changes.
Need explanation and solution.
Thanks
Evgeniy Mai
Tadiran Electronic Systems Ltd
We have the following problem :
1. There is "START" button on Web Form which on server's event "clicked" starts some process - "Process.Start(SomeProcess);"
and then calls "UpdateProgressBar" function.
The process inside looks like this:
SomeProcess
{
While (1)
{
DoSomething();
WriteProgressIndicatorsValueToFile();
}
}
2. Update ProgressBar function just reads the values from file and updates the progress bar, it's working.
UpdateProgressBar()
{
RadProgressContext progress = RadProgressContext.Current;
while (!stoppedByUser)
{
ReadProgressIndicatorsValueFromFile();
progress.SecondaryValue = ....
progress.CurrentOperationText = ...
Thread.Sleep(1000);
stoppedByUser = progress.OperationComplete;
}
}
3. We added "STOP" button to form to stop the progress bar loop.
Problem:
Everything We have tried to exit the loop isn't working, including adding in onClientClick of "STOP" Button {ProgressData.OperationComplete = true }
and then checking the value in server's UpdateProgressBar() inner loop. The change of progress values on client just doesn't affect
values on server.
Also tried to add HiddenField and update it on onClientClick of "STOP" Button, the sercer inside UpdateProgressBar() inner loop also doesn't see any changes.
Need explanation and solution.
Thanks
Evgeniy Mai
Tadiran Electronic Systems Ltd