获取指定目标的网页源代码!

    private string getHtml(string url)
    {
        WebClient myWebClient = new WebClient();
        byte[] myDataBuffer = myWebClient.DownloadData(url);
        return Encoding.Default.GetString(myDataBuffer);
    }
posted @ 2009-06-09 18:01  起源  阅读(368)  评论(2编辑  收藏  举报