模拟form提交

using   System; 
using   System.Collections; 
using   System.Net; 
using   System.Collections.Specialized; 

public   class   MyClass 

public   static   void   Main() 

WebClient   a   =   new   WebClient();   
NameValueCollection   na   =   new   NameValueCollection();   
na.Add( "Account ", "横刀夺爱 ");   
na.Add( "PassPhrase ", "123456 ");   
na.Add( "Payee_Account ", "2654824 ");   
na.Add( "Amount ", "0.01 ");   
na.Add( "PAY_IN ", "1 ");   
na.Add( "WORTH_OF ", "Gold ");   
na.Add( "Memo ", "just   test ");   
na.Add( "IGNORE_RATE_CHANGE ", "Y ");   
byte   []   ss   =   a.UploadValues( "http://localhost/TestAspx/WebClient_Test.ASPX ", "POST ",na);   
Console.ReadLine(); 


}

原文地址:https://www.cnblogs.com/xgbzsc/p/2618413.html