日期:2014-05-18  浏览次数:20532 次

直接在ie地址输入带中文参数可以显示xml数据,这样就的话就取不到xml数据。
System.Net.WebClient wc = new System.Net.WebClient();
  string url1 = "http://find.com:6777/xml/news//getnews.asp?ex=10&kw=你好";
  Uri u = new Uri(url1);
  byte[] b = wc.DownloadData(u);
  string responseBody = System.Text.Encoding.GetEncoding("gb2312").GetString(b);
  System.Xml.XmlDocument xml = new System.Xml.XmlDocument();
  xml.LoadXml(GetURLResult(url1));

直接在ie地址输入带中文参数可以显示xml数据,这样就的话就取不到xml数据。怎么编码什么的都不行阿 

各位有什么好办法吗

------解决方案--------------------
将url 编码