Download string from a website using the WebClient : WebClient « Network « C# / CSharp Tutorial
- C# / CSharp Tutorial
- Network
- WebClient
using System;
using System.IO;
using System.Net;
using System.Text.RegularExpressions;
class MainClass
{
private static void Main()
{
string remoteUri = "http://www.java2s.com";
WebClient client = new WebClient();
Console.WriteLine("Downloading {0}", remoteUri);
string str = client.DownloadString(remoteUri);
Console.WriteLine(str);
}
}
Downloading http://www.java2s.com
Java examples (example source code) Organized by topic
...
...