Exemple #1
0
        public string GetPage(string url)
        {
            string data = string.Empty;

            //WebClient webClient = null;

            try
            {
                //webClient = new WebClient();
                data = webClient.DownloadString(url);
                webClient.DownloadFile(url, url + ".htm");
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }

            //if (webClient != null)
            //{
            //    webClient.Dispose();
            //}

            return(data);
        }