如何使用ASP.NET从url获取XML数据

时间:2015-02-25 12:07:11

标签: c# asp.net xml xmlreader

我想获取XML数据这个页面的源代码但是我没有得到它。 我认为这个页面是会议,我不能这样做。我需要帮助

Page:https://www.betorder.com/LiveScore.html?sportTypeId=1

Xml数据:https://www.betorder.com/GetLiveScore?qq=62642&sportTypeId=1&fid=0&lang=TR&countryId=all&checkBoxSelected=all

 string adres = "https://www.betorder.com/GetLiveScore?qq=62642&sportTypeId=1&fid=0&lang=TR&countryId=all&checkBoxSelected=all";
    WebRequest gelenIstek = HttpWebRequest.Create(adres);
    WebResponse gelenCevap;
    using (gelenCevap = gelenIstek.GetResponse())
    {
        using (StreamReader donenDeger = new StreamReader(gelenCevap.GetResponseStream()))
        {
            string gelenBilgi = donenDeger.ReadToEnd();
            string gonder = gelenBilgi;
            div.InnerHtml = gonder;
        }
    }

0 个答案:

没有答案