silverlight开发,我用webclient从网页上获取数据,抛出异常
代码如下:Stringurl2=http://m.weather.com.cn/data/101120101.html;Uriuri=newUri(url2);WebCl...
代码如下:
String url2 = http://m.weather.com.cn/data/101120101.html;
Uri uri = new Uri(url2);WebClient wc = new WebClient();wc.Encoding = System.Text.Encoding.UTF8;
wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted);wc.DownloadStringAsync(uri);
在wc_DownloadStringCompleted函数里使用e.result时抛出异常,该怎么解决? 展开
String url2 = http://m.weather.com.cn/data/101120101.html;
Uri uri = new Uri(url2);WebClient wc = new WebClient();wc.Encoding = System.Text.Encoding.UTF8;
wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted);wc.DownloadStringAsync(uri);
在wc_DownloadStringCompleted函数里使用e.result时抛出异常,该怎么解决? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询