当我上下页时,我只能在背景工人工作完成后才能行走......它是否像名字所说的那样在背景上执行?
这部法律是:
protected void Page_Load(object sender, EventArgs e)
{
BackgroundWorker _bgk = new BackgroundWorker();
_bgk.DoWork += new DoWorkEventHandler(DoWork_BackGroundWork);
_bgk.RunWorkerCompleted += new RunWorkerCompletedEventHandler(WorkComplete_BackGroundWork);
_bgk.RunWorkerAsync();
}
private void DoWork_BackGroundWork(object sender, DoWorkEventArgs e)
{
for (int i = 0; i < 99999; i++)
{
Trace.Write("STILL EXECUTING BACKGROUND WORKER");
}
}
private void WorkComplete_BackGroundWork(object sender, RunWorkerCompletedEventArgs e)
{
Trace.Write("===================== BACKGROUND WORKER FINISHED ===================");
}