System.Net.WebClient client = new System.Net.WebClient();//客户端对象
string url = "http:f";
client.Encoding = Encoding.UTF8;
string responseTest = client.DownloadString(url);//下载xml响应数据
string url = "http:f";
client.Encoding = Encoding.UTF8;
string responseTest = client.DownloadString(url);//下载xml响应数据

本文介绍如何使用System.Net.WebClient类从指定URL下载XML响应数据,并设置编码为UTF8。

被折叠的 条评论
为什么被折叠?



