可以考虑Web services,Web services支持异步调用,你可以将较长的操作时放到Web services中。

解决方案 »

  1.   

    按你的意思是我需要建个服务来处理业务
    .net中的线程不支持异步调用吗?
      

  2.   

    用异步委托
    delegate int Count(int a);
    Count del =new Count(你的函数);
    IAsyncReslut ar =del.BeginInvoke(10000,null,null);
    .............
    if(ar.IsCompleted)
    {
    int count=del.EndInvoke(ar);
    }
    else
    {
    以后再试}
    也可以使用CALLBACK方式
    delegate int Count(int a);
    Count del =new Count(你的函数);
    AsyncCallback ab=new AsyncCallback(yourcallback)
    IAsyncReslut ar =del.BeginInvoke(10000,ab,null);
    .............
      

  3.   

    用webService可以满足你的调用结束时通知前台界面的要求
    参考:
    http://msdn.microsoft.com/downloads/samples/internet/default.asp?url=/downloads/samples/internet/behaviors/library/webservice/default.asp可以下载webservice.htc更方便调用webservice
      

  4.   

    我用CALLBACK方式
             delegate int Count();
             -------------

             Count del =new Count(我的函数);
    AsyncCallback ab=new AsyncCallback(this.callback);
    del.BeginInvoke(ab,null); private void callback(IAsyncResult handle)
    {
      this.textbox1.Text = "ok";
    }可是文本框里面始终赋不上值,单步调试确可以运行到赋值那句,可界面就是显示不出来。
    请高手指教!!!
      

  5.   

    MSDN有分頁的樣例,你自已看一下啊!很簡單的!
      

  6.   

    我用CALLBACK方式
             delegate int Count();
             -------------

             Count del =new Count(我的函数);
    AsyncCallback ab=new AsyncCallback(this.callback);
    del.BeginInvoke(ab,null); private void callback(IAsyncResult handle)
    {
      this.textbox1.Text = "ok";
    }可是文本框里面始终赋不上值,单步调试确可以运行到赋值那句,可界面就是显示不出来。
    请高手指教!!!
      

  7.   

    处理结束时需要通知前台界面完成
    ===========>
    这个恐怕做不到,但可以实现发邮件通知用户,在asp.net中使用多线程可以参看这篇文章:http://www.sitepoint.com/print/threading-asp-net