I have two buttons on a form, "Pause" and "Continue".
When "Pause" button is clicked, it should:
1) Stop the background worker;
and, 2) Enable the "Continue" button.
I have the code below to explicitly enable the "Continue" button.
However, it's still not enabled. Anyone can tell me why? Thanks.
--------------------------------------------------------------------------------------------------------------------
protected void pauseButton_Cli ck(object sender, EventArgs e)
{
if (mBaseWorker.Ba ckgroundWorker != null)
{
mBaseWorker.Bac kgroundWorker.C ancelAsync();
}
this.continueBu tton.Enabled = true;
this.Refresh();
}
--------------------------------------------------------------------------------------------------------------------
When "Pause" button is clicked, it should:
1) Stop the background worker;
and, 2) Enable the "Continue" button.
I have the code below to explicitly enable the "Continue" button.
However, it's still not enabled. Anyone can tell me why? Thanks.
--------------------------------------------------------------------------------------------------------------------
protected void pauseButton_Cli ck(object sender, EventArgs e)
{
if (mBaseWorker.Ba ckgroundWorker != null)
{
mBaseWorker.Bac kgroundWorker.C ancelAsync();
}
this.continueBu tton.Enabled = true;
this.Refresh();
}
--------------------------------------------------------------------------------------------------------------------
Comment