下面程序下载http://127.0.0.1的字符串: try { WebClient client = new WebClient(); client.Encoding = Encoding.UTF8; client.DownloadStringCompleted += client_DownloadStringCompleted; Uri uri = new Uri("http://127.0.0.1", UriKind.Absolute); client.DownloadStringAsync(uri); msg.Text = "OK"; } catch (Exception exp) { msg.Text = exp.Message; }在执行client.DownloadStringAsync(uri)后