Set the BaseAddress for WebClient : Web Crawler « Network « C# / C Sharp
- C# / C Sharp
- Network
- Web Crawler
Set the BaseAddress for WebClient
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
class Program {
static void Main(string[] args) {
WebClient client = new WebClient();
client.BaseAddress = "http://www.microsoft.com";
string data = client.DownloadString("Office");
Console.WriteLine(data);
}
}
Related examples in the same category