A
Alan Z. Scharf
1. I have a chain of six asynch callbacks initiated by a button, and want
the page to refresh at the end of each callback to display
A. Results of a SQLServer query showing cumulative running time, and
B. A progress bar.
2. I have this working with a refresh timer:
<META http-equiv="refresh" content="5">
3. However, the blinking of page reloads is annoying, and I'd prefer to have
the page reload at exactly the end of each callback EndInvoke.
What is the command to force page reload in C#?
4. One of my HandleCompletions is below, with the place indicated where I
want to reload the page.
Thanks for any help.
Alan
private void HandleUpdateCapitalCompletion(IAsyncResult asyncResult)
{
try
{
// Retrieve Update delegate object
UpdateCapitalDelegate updateCapital = (UpdateCapitalDelegate)
asyncResult.AsyncState;
//Call EndInvoke to get result of UpdateCapital
string updateCapitalResult = updateCapital.EndInvoke(asyncResult);
//*** RELOAD THE PAGE HERE ****
// Start next delegate in chain
StartUpdateAverageCapitalDelegate();
}
catch (Exception ex)
{
// Exception will be thrown by EndInvoke if Update() threw an exception
Console.Error.WriteLine(ex.ToString());
}
}
the page to refresh at the end of each callback to display
A. Results of a SQLServer query showing cumulative running time, and
B. A progress bar.
2. I have this working with a refresh timer:
<META http-equiv="refresh" content="5">
3. However, the blinking of page reloads is annoying, and I'd prefer to have
the page reload at exactly the end of each callback EndInvoke.
What is the command to force page reload in C#?
4. One of my HandleCompletions is below, with the place indicated where I
want to reload the page.
Thanks for any help.
Alan
private void HandleUpdateCapitalCompletion(IAsyncResult asyncResult)
{
try
{
// Retrieve Update delegate object
UpdateCapitalDelegate updateCapital = (UpdateCapitalDelegate)
asyncResult.AsyncState;
//Call EndInvoke to get result of UpdateCapital
string updateCapitalResult = updateCapital.EndInvoke(asyncResult);
//*** RELOAD THE PAGE HERE ****
// Start next delegate in chain
StartUpdateAverageCapitalDelegate();
}
catch (Exception ex)
{
// Exception will be thrown by EndInvoke if Update() threw an exception
Console.Error.WriteLine(ex.ToString());
}
}