C#.net模拟提交表单POST [方法一测试成功]
System.Net.WebClient WebClientObj = new System.Net.WebClient();
System.Collections.Specialized.NameValueCollection PostVars = new System.Collections.Specialized.NameValueCollection();
PostVars.Add("A1","0");
PostVars.Add("A2","0");
PostVars.Add("A3","000");
try
{
byte[] byRemoteInfo = WebClientObj.UploadValues("http://www.lovezhao.com/vote.asp","POST",PostVars);
//下面都没用啦,就上面一句话就可以了
string sRemoteInfo = System.Text.Encoding.Default.GetString(byRemoteInfo);
//这是获取返回信息
richTextBox_instr.Text += sRemoteInfo;
}
catch
{} 

浙公网安备 33010602011771号