http://www.drdobbs.com/windows/writing-your-first-windows-8-app-the-lay/240143752 says HttpClient
is replacing WebClient
in windows 8 app
Uploadstring
uses post method to send data and PostAsync
is available in HttpClient
which is what you might need.
try something like this.
using System.Net.Http;
//Windows.Web.Http
string URI = "http://www.myurl.com/post.php";
string myParameters = "param1=value1¶m2=value2¶m3=value3";
sendData(URI,myParameters);
public async void sendData(string URI,string myParameters)
{
using(HttpClient hc = new HttpClient())
{
Var response = await hc.PostAsync(URI,new StringContent (myParameters));
}
}