2013年12月30日 星期一

WebClient運用:可以每天自動抓yahoo股票行情


        WebClient wc = new WebClient();
        byte[] b = wc.DownloadData("http://tw.yahoo.com");

        string html = Encoding.Default.GetString(b);
        Response.Write(html);


========================
同場加映:
WebClient運用:自動下載遠端網路檔案

沒有留言:

張貼留言