1 的WebClient对象具有能为你做这个的方法: WebClient client = new WebClient(); string html = client.DownloadString("http://www.google.com"); 来源 2011-07-01 18:55:00 +0 +1,虽然这将包括标记为好。 – Yuck +0 上面的例子只适用于老版本,不适用于我的Visual Studio 2008.正确的代码是: #using using namespace System :: Net; 使用命名空间System :: IO; 使用命名空间System; (){ WebClient^client = gcnew WebClient; CString html = client-> DownloadString(_T(“http://www.google.bg/”)); } – Trepach
+1,虽然这将包括标记为好。 – Yuck
上面的例子只适用于老版本,不适用于我的Visual Studio 2008.正确的代码是: #using using namespace System :: Net; 使用命名空间System :: IO; 使用命名空间System; (){ WebClient^client = gcnew WebClient; CString html = client-> DownloadString(_T(“http://www.google.bg/”)); } –
Trepach