Hi,
I am using the below code to post using HttpClient:
var client = new HttpClient();
client.BaseAddress = new Uri("https://www.mydomain.com/post_vote.php");
var content = new FormUrlEncodedContent(new[]
{
new KeyValuePair<string, string>("item", myItem ),
new KeyValuePair<string, string>("user", myUser ),
new KeyValuePair<string, string>("rating", Convert.ToString(e.Value)),
});
var response = await client.PostAsync("https://www.mydomain.com/post_vote.php", content);
This is working perfectly when posting a single value to MySQL database
But what if I have SfList which has SfRating in every row and I have a button:
async void ButtonSave_Clicked(System.Object sender, System.EventArgs e)
{
---- SUBMIT RAFTING VALUES ----
}
and I want upon clicking on the button to read all the values and post it to te database
Posting it through loop or foreach might take a long time and consume bandwidth, correct?
So what is the best practice here?
Thanks,
Jassim