不做解释

string uriString = http://www.xxx.com/;
string postString = "name=xxxx&passwd=xxxx";
WebClient webClient = new WebClient();
webClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded");
byte[] postData = Encoding.Default.GetBytes(postString);
byte[] responseData = webClient.UploadData(uriString, "POST", postData);
string srcString = Encoding.UTF8.GetString(responseData);
if (srcString.IndexOf("xxx") > 0)
{
     Console.WriteLine("xxx");
}
原文地址:https://www.cnblogs.com/webyu/p/3057052.html