如何使用 ASP.NET 获取网页内容?我需要编写一个程序来获取网页的 HTML 并将其存储到字符串变量中。
最佳答案
您可以使用 WebClient
Using System.Net;
WebClient client = new WebClient();
string downloadString = client.DownloadString("http://www.gooogle.com");
关于c# - 如何获取网页内容并将其保存到字符串变量中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4510212/