private string getWebresourceFile1(string url)
{
WebClient myWebClient = new WebClient();
byte[] myDataBuffer = myWebClient.DownloadData(url);
string SourceCode = Encoding.Default.GetString(myDataBuffer);
saveSourceCode(SourceCode);
return SourceCode;
}
HttpWebRequest myRequest = (HttpWebRequest)WebRequest.Create("http://www.baidu.com/index.aspx");
myRequest.GetResponse();
WebClient _Client = new WebClient();
_Client.OpenRead("http://www.baidu.com/index.aspx”);