BackgroundWorker thread in ASP.NET

后端 未结 7 1855
日久生厌
日久生厌 2020-11-27 17:50

Is it possible to use BackGroundWorker thread in ASP.NET 2.0 for the following scenario, so that the user at the browser\'s end does not have to wait for long time?

相关标签:
7条回答
  • 2020-11-27 18:21

    If you want using multitheading in your ASP page, you might using simple threading model like this:

    {
        System.Threading.Thread _thread = new Thread(new ThreadStart(Activity_DoWork));
        _thred.Start();
    }
    Activity_DoWork()
    {
        /*Do some things...
    }
    

    This method is correct working with ASP pages. The ASP page with BackgroundWorker will not start while BackgroundWorker will finish.

    0 讨论(0)
提交回复
热议问题