|
|
|
|
|
|
|
|
简单的异步 Web 方法 为举例说明异步 Web 方法,我从一个名为 LengthyProcedure 的简单同步 Web 方法开始,其代码如下所示。然后我们再看一看如何异步完成相同的任务。LengthyProcedure 只占用给定的毫秒数。 [WebService] public class SyncWebService : System.Web.Services.WebService { [WebMethod] public string LengthyProcedure(int milliseconds) { System.Threading.Thread.Sleep(milliseconds); return "成功"; 页码:[1] [2] [3] [4] [5] 第1页、共5页 |
|
|
|
|
设为首页 | 加入收藏 | 广告服务 | 友情链接 | 版权申明
Copyriht 2007 - 2008 © 科普之友 All right reserved |