2011-12-15 36 views
0

目前我在做这样WebClient.DownloadStringAsync在http中有响应吗?

字符串URL =( “HTTP://localhost/json.aspx”);

 WebClient xmlClient = new WebClient(); 
     xmlClient.DownloadStringCompleted += new DownloadStringCompletedEventHandler(XMLFileLoaded); 



     xmlClient.DownloadStringAsync(new Uri(url)); 

但是我如何添加应该连同downloadstring被发送值? 例如在Android中,我能够使用namevalue对

 httppost.setEntity(new UrlEncodedFormEntity( nameValuePairs, "UTF-8")); 

回答

1

我会强烈建议您使用RestSharp对于这一点,而不是试图手工编码。

+0

嗨,感谢您将会看到它 – ericlee 2011-12-15 14:39:20